Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Niegsch
erp5
Commits
78a8f52c
Commit
78a8f52c
authored
May 18, 2020
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: Make ERP5Type self-contained and independent of ERP5 Product.
parent
c502e47c
Changes
57
Hide whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
72 additions
and
64 deletions
+72
-64
bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py
...mplateItem/portal_components/test.erp5.testInotifyTool.py
+1
-1
bt5/erp5_tiosafe_magento_test/ExtensionTemplateItem/MagentoTest.py
...tiosafe_magento_test/ExtensionTemplateItem/MagentoTest.py
+1
-1
bt5/erp5_tiosafe_oxatis_test/ExtensionTemplateItem/OxatisTest.py
...5_tiosafe_oxatis_test/ExtensionTemplateItem/OxatisTest.py
+1
-1
bt5/erp5_tiosafe_ubercart_test/ExtensionTemplateItem/UbercartTest.py
...osafe_ubercart_test/ExtensionTemplateItem/UbercartTest.py
+1
-1
bt5/erp5_tiosafe_virtuemart_test/ExtensionTemplateItem/VirtueMartTest.py
...e_virtuemart_test/ExtensionTemplateItem/VirtueMartTest.py
+1
-1
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+3
-3
product/ERP5/Interactor/PortalTypeClassInteractor.py
product/ERP5/Interactor/PortalTypeClassInteractor.py
+1
-1
product/ERP5/__init__.py
product/ERP5/__init__.py
+3
-6
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.SimulationMovement.py
...tem/portal_components/document.erp5.SimulationMovement.py
+1
-1
product/ERP5/bootstrap/erp5_core/InterfaceTemplateItem/portal_components/interface.erp5.ISimulationMovement.py
...m/portal_components/interface.erp5.ISimulationMovement.py
+1
-1
product/ERP5/interfaces/mapped_value.py
product/ERP5/interfaces/mapped_value.py
+2
-2
product/ERP5Catalog/CatalogTool.py
product/ERP5Catalog/CatalogTool.py
+1
-1
product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py
product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py
+1
-1
product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py
product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py
+1
-1
product/ERP5Form/Form.py
product/ERP5Form/Form.py
+2
-2
product/ERP5Form/ScribusUtils.py
product/ERP5Form/ScribusUtils.py
+1
-1
product/ERP5SyncML/Engine/AsynchronousEngine.py
product/ERP5SyncML/Engine/AsynchronousEngine.py
+1
-1
product/ERP5SyncML/Tool/SynchronizationTool.py
product/ERP5SyncML/Tool/SynchronizationTool.py
+1
-1
product/ERP5SyncML/Transport/ERP5.py
product/ERP5SyncML/Transport/ERP5.py
+1
-1
product/ERP5SyncML/Transport/Mail.py
product/ERP5SyncML/Transport/Mail.py
+1
-1
product/ERP5SyncML/XMLSyncUtils.py
product/ERP5SyncML/XMLSyncUtils.py
+1
-1
product/ERP5TioSafe/ConnectionPlugin/DocumentConnection.py
product/ERP5TioSafe/ConnectionPlugin/DocumentConnection.py
+1
-1
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+1
-1
product/ERP5Type/ConnectionPlugin/SQLConnection.py
product/ERP5Type/ConnectionPlugin/SQLConnection.py
+1
-1
product/ERP5Type/Core/BaseCategory.py
product/ERP5Type/Core/BaseCategory.py
+0
-0
product/ERP5Type/Core/StandardProperty.py
product/ERP5Type/Core/StandardProperty.py
+4
-4
product/ERP5Type/ERP5Defaults.py
product/ERP5Type/ERP5Defaults.py
+0
-0
product/ERP5Type/ERP5Site.py
product/ERP5Type/ERP5Site.py
+0
-0
product/ERP5Type/Message.py
product/ERP5Type/Message.py
+1
-1
product/ERP5Type/Tool/BaseTool.py
product/ERP5Type/Tool/BaseTool.py
+1
-1
product/ERP5Type/Tool/CategoryTool.py
product/ERP5Type/Tool/CategoryTool.py
+0
-0
product/ERP5Type/Tool/PropertySheetTool.py
product/ERP5Type/Tool/PropertySheetTool.py
+2
-2
product/ERP5Type/Tool/TypesTool.py
product/ERP5Type/Tool/TypesTool.py
+9
-2
product/ERP5Type/UnrestrictedMethod.py
product/ERP5Type/UnrestrictedMethod.py
+1
-1
product/ERP5Type/Utils.py
product/ERP5Type/Utils.py
+1
-1
product/ERP5Type/__init__.py
product/ERP5Type/__init__.py
+5
-3
product/ERP5Type/dtml/addERP5Site.dtml
product/ERP5Type/dtml/addERP5Site.dtml
+0
-0
product/ERP5Type/dtml/addPortal.dtml
product/ERP5Type/dtml/addPortal.dtml
+0
-0
product/ERP5Type/dynamic/component_package.py
product/ERP5Type/dynamic/component_package.py
+1
-1
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+1
-1
product/ERP5Type/dynamic/persistent_migration.py
product/ERP5Type/dynamic/persistent_migration.py
+1
-1
product/ERP5Type/interfaces/__init__.py
product/ERP5Type/interfaces/__init__.py
+2
-0
product/ERP5Type/interfaces/predicate.py
product/ERP5Type/interfaces/predicate.py
+0
-0
product/ERP5Type/interfaces/property_recordable.py
product/ERP5Type/interfaces/property_recordable.py
+0
-0
product/ERP5Type/mixin/component.py
product/ERP5Type/mixin/component.py
+1
-1
product/ERP5Type/mixin/property_recordable.py
product/ERP5Type/mixin/property_recordable.py
+0
-0
product/ERP5Type/patches/CMFCoreUtils.py
product/ERP5Type/patches/CMFCoreUtils.py
+1
-1
product/ERP5Type/patches/ExceptionFormatter.py
product/ERP5Type/patches/ExceptionFormatter.py
+1
-1
product/ERP5Type/patches/pylint.py
product/ERP5Type/patches/pylint.py
+1
-1
product/ERP5Type/portal.gif
product/ERP5Type/portal.gif
+0
-0
product/ERP5Type/tests/CodingStyleTest.py
product/ERP5Type/tests/CodingStyleTest.py
+1
-1
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
+1
-1
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+2
-2
product/ERP5Type/tests/custom_zodb.py
product/ERP5Type/tests/custom_zodb.py
+1
-1
product/ERP5Type/tests/runUnitTest.py
product/ERP5Type/tests/runUnitTest.py
+1
-1
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+2
-2
product/ERP5Wizard/tests/testERP5RemoteUserManager.py
product/ERP5Wizard/tests/testERP5RemoteUserManager.py
+1
-1
No files found.
bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py
View file @
78a8f52c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
import
os
,
shutil
,
tempfile
,
unittest
import
os
,
shutil
,
tempfile
,
unittest
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5.ERP5Site
import
addERP5Tool
from
Products.ERP5
Type
.ERP5Site
import
addERP5Tool
class
TestInotifyTool
(
ERP5TypeTestCase
):
class
TestInotifyTool
(
ERP5TypeTestCase
):
def
test_inotify
(
self
):
def
test_inotify
(
self
):
...
...
bt5/erp5_tiosafe_magento_test/ExtensionTemplateItem/MagentoTest.py
View file @
78a8f52c
...
@@ -37,7 +37,7 @@ class MagentoTestConnector:
...
@@ -37,7 +37,7 @@ class MagentoTestConnector:
def
__init__
(
self
):
def
__init__
(
self
):
"""
"""
"""
"""
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
self
.
context
=
getSite
()
self
.
context
=
getSite
()
...
...
bt5/erp5_tiosafe_oxatis_test/ExtensionTemplateItem/OxatisTest.py
View file @
78a8f52c
...
@@ -184,7 +184,7 @@ class OxatisTestConnector:
...
@@ -184,7 +184,7 @@ class OxatisTestConnector:
def
__init__
(
self
):
def
__init__
(
self
):
"""
"""
"""
"""
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
self
.
context
=
getSite
()
self
.
context
=
getSite
()
...
...
bt5/erp5_tiosafe_ubercart_test/ExtensionTemplateItem/UbercartTest.py
View file @
78a8f52c
...
@@ -107,7 +107,7 @@ class UbercartTestConnector:
...
@@ -107,7 +107,7 @@ class UbercartTestConnector:
def
__init__
(
self
):
def
__init__
(
self
):
"""
"""
"""
"""
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
self
.
context
=
getSite
()
self
.
context
=
getSite
()
def
validateXMLScheme
(
self
,
xml
,
xsd_filename
):
def
validateXMLScheme
(
self
,
xml
,
xsd_filename
):
...
...
bt5/erp5_tiosafe_virtuemart_test/ExtensionTemplateItem/VirtueMartTest.py
View file @
78a8f52c
...
@@ -116,7 +116,7 @@ class VirtueMartTestConnector:
...
@@ -116,7 +116,7 @@ class VirtueMartTestConnector:
def
__init__
(
self
):
def
__init__
(
self
):
"""
"""
"""
"""
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
self
.
context
=
getSite
()
self
.
context
=
getSite
()
def
getPropertySheetDefinitionList
(
self
,
type
):
def
getPropertySheetDefinitionList
(
self
,
type
):
...
...
product/ERP5/Document/BusinessTemplate.py
View file @
78a8f52c
...
@@ -5451,7 +5451,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
...
@@ -5451,7 +5451,7 @@ Business Template is a set of definitions, such as skins, portal types and categ
# update tools if necessary
# update tools if necessary
if
self
.
getTitle
()
==
'erp5_core'
and
self
.
getTemplateUpdateTool
():
if
self
.
getTitle
()
==
'erp5_core'
and
self
.
getTemplateUpdateTool
():
from
Products.ERP5.ERP5Site
import
ERP5Generator
from
Products.ERP5
Type
.ERP5Site
import
ERP5Generator
gen
=
getattr
(
site
,
'_generator_class'
,
ERP5Generator
)()
gen
=
getattr
(
site
,
'_generator_class'
,
ERP5Generator
)()
LOG
(
'Business Template'
,
0
,
'Updating Tools'
)
LOG
(
'Business Template'
,
0
,
'Updating Tools'
)
gen
.
setup
(
site
,
0
,
update
=
1
)
gen
.
setup
(
site
,
0
,
update
=
1
)
...
@@ -6457,9 +6457,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
...
@@ -6457,9 +6457,9 @@ Business Template is a set of definitions, such as skins, portal types and categ
_migrate_exception_set
=
set
([
_migrate_exception_set
=
set
([
## Bootstrap
## Bootstrap
'Products.ERP5.Document.BusinessTemplate'
,
'Products.ERP5.Document.BusinessTemplate'
,
'Products.ERP5.ERP5Site'
,
'Products.ERP5
Type
.ERP5Site'
,
'Products.ERP5.genbt5list'
,
'Products.ERP5.genbt5list'
,
'Products.ERP5.Tool.CategoryTool'
,
'Products.ERP5
Type
.Tool.CategoryTool'
,
'Products.ERP5.Tool.TemplateTool'
,
'Products.ERP5.Tool.TemplateTool'
,
'Products.ERP5Type.Base'
,
'Products.ERP5Type.Base'
,
'Products.ERP5Type.Cache'
,
'Products.ERP5Type.Cache'
,
...
...
product/ERP5/Interactor/PortalTypeClassInteractor.py
View file @
78a8f52c
...
@@ -59,7 +59,7 @@ class PortalTypeClassInteractor(Interactor):
...
@@ -59,7 +59,7 @@ class PortalTypeClassInteractor(Interactor):
"""
"""
Call resetDynamicDocuments at the end of the transaction
Call resetDynamicDocuments at the end of the transaction
"""
"""
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
# method_call_object might be an unwrapped DCWorflowDefinition method,
# method_call_object might be an unwrapped DCWorflowDefinition method,
# no even belonging to a container.
# no even belonging to a container.
portal
=
getSite
()
portal
=
getSite
()
...
...
product/ERP5/__init__.py
View file @
78a8f52c
...
@@ -41,21 +41,18 @@ from Products.ERP5Type.Globals import package_home
...
@@ -41,21 +41,18 @@ from Products.ERP5Type.Globals import package_home
product_path
=
package_home
(
globals
()
)
product_path
=
package_home
(
globals
()
)
# Define object classes and tools
# Define object classes and tools
from
Tool
import
CategoryTool
,
IdTool
,
TemplateTool
,
\
from
Tool
import
IdTool
,
TemplateTool
,
\
TestTool
,
DomainTool
,
AlarmTool
,
\
TestTool
,
DomainTool
,
AlarmTool
,
\
TrashTool
,
ContributionTool
,
NotificationTool
,
PasswordTool
,
\
TrashTool
,
ContributionTool
,
NotificationTool
,
PasswordTool
,
\
GadgetTool
,
ContributionRegistryTool
,
IntrospectionTool
,
\
GadgetTool
,
ContributionRegistryTool
,
IntrospectionTool
,
\
AcknowledgementTool
,
SolverTool
,
\
AcknowledgementTool
,
SolverTool
,
\
UrlRegistryTool
,
InterfaceTool
,
\
UrlRegistryTool
,
InterfaceTool
,
\
CertificateAuthorityTool
,
InotifyTool
CertificateAuthorityTool
,
InotifyTool
import
ERP5Site
from
Document
import
PythonScript
,
SQLMethod
from
Document
import
PythonScript
,
SQLMethod
object_classes
=
(
ERP5Site
.
ERP5Site
,
object_classes
=
(
PythonScript
.
PythonScriptThroughZMI
,
PythonScript
.
PythonScriptThroughZMI
,
SQLMethod
.
SQLMethod
,
SQLMethod
.
SQLMethod
,
)
)
portal_tools
=
(
CategoryTool
.
CategoryTool
,
portal_tools
=
(
IdTool
.
IdTool
,
IdTool
.
IdTool
,
TemplateTool
.
TemplateTool
,
TemplateTool
.
TemplateTool
,
AlarmTool
.
AlarmTool
,
AlarmTool
.
AlarmTool
,
DomainTool
.
DomainTool
,
DomainTool
.
DomainTool
,
...
...
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.SimulationMovement.py
View file @
78a8f52c
...
@@ -37,7 +37,7 @@ from erp5.component.module.ExpandPolicy import policy_dict, TREE_DELIVERED_CACHE
...
@@ -37,7 +37,7 @@ from erp5.component.module.ExpandPolicy import policy_dict, TREE_DELIVERED_CACHE
from
zLOG
import
LOG
,
WARNING
from
zLOG
import
LOG
,
WARNING
from
Products.ERP5.mixin.property_recordable
import
PropertyRecordableMixin
from
Products.ERP5
Type
.mixin.property_recordable
import
PropertyRecordableMixin
from
erp5.component.mixin.ExplainableMixin
import
ExplainableMixin
from
erp5.component.mixin.ExplainableMixin
import
ExplainableMixin
from
erp5.component.interface.IExpandable
import
IExpandable
from
erp5.component.interface.IExpandable
import
IExpandable
...
...
product/ERP5/bootstrap/erp5_core/InterfaceTemplateItem/portal_components/interface.erp5.ISimulationMovement.py
View file @
78a8f52c
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
erp5.component.interface.ISimulationMovement
erp5.component.interface.ISimulationMovement
"""
"""
from
Products.ERP5.interfaces.property_recordable
import
IPropertyRecordable
from
Products.ERP5
Type
.interfaces.property_recordable
import
IPropertyRecordable
from
Products.ERP5.interfaces.movement
import
IMovement
from
Products.ERP5.interfaces.movement
import
IMovement
from
erp5.component.interface.IDivergenceController
import
IDivergenceController
from
erp5.component.interface.IDivergenceController
import
IDivergenceController
from
Products.ERP5.interfaces.explainable
import
IExplainable
from
Products.ERP5.interfaces.explainable
import
IExplainable
...
...
product/ERP5/interfaces/mapped_value.py
View file @
78a8f52c
...
@@ -27,11 +27,11 @@
...
@@ -27,11 +27,11 @@
#
#
##############################################################################
##############################################################################
from
Products.ERP5
.interfaces.predicate
import
IPredicate
from
Products.ERP5
Type
import
interfaces
_MARKER
=
[]
_MARKER
=
[]
class
IMappedValue
(
IPredicate
):
class
IMappedValue
(
interfaces
.
IPredicate
):
"""Mapped Value document interface specification
"""Mapped Value document interface specification
A Mapped Value provides
A Mapped Value provides
...
...
product/ERP5Catalog/CatalogTool.py
View file @
78a8f52c
...
@@ -387,7 +387,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
...
@@ -387,7 +387,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
parent
=
self
.
aq_parent
parent
=
self
.
aq_parent
portal_types
=
parent
.
portal_types
portal_types
=
parent
.
portal_types
portal_property_sheets
=
parent
.
portal_property_sheets
portal_property_sheets
=
parent
.
portal_property_sheets
from
Products.ERP5.ERP5Site
import
ERP5Generator
from
Products.ERP5
Type
.ERP5Site
import
ERP5Generator
ERP5Generator
.
bootstrap
(
portal_types
,
'erp5_core'
,
'PortalTypeTemplateItem'
,
(
ERP5Generator
.
bootstrap
(
portal_types
,
'erp5_core'
,
'PortalTypeTemplateItem'
,
(
'Catalog'
,
'Catalog'
,
'Catalog Tool'
,
'Catalog Tool'
,
...
...
product/ERP5Form/Extensions/ERP5Site_createModuleScribus.py
View file @
78a8f52c
...
@@ -54,7 +54,7 @@ def ERP5Site_createModuleScribus(self,
...
@@ -54,7 +54,7 @@ def ERP5Site_createModuleScribus(self,
from
Products.ERP5Form.CreatePropertySheet
import
LocalGenerator
from
Products.ERP5Form.CreatePropertySheet
import
LocalGenerator
# importing module to get an access to the 'searchFolder' method
# importing module to get an access to the 'searchFolder' method
# needed to be able to list the objects in 'list_object_view' form
# needed to be able to list the objects in 'list_object_view' form
from
Products.ERP5.ERP5Site
import
ERP5Site
from
Products.ERP5
Type
.ERP5Site
import
ERP5Site
from
zLOG
import
LOG
,
TRACE
,
WARNING
,
ERROR
,
INFO
from
zLOG
import
LOG
,
TRACE
,
WARNING
,
ERROR
,
INFO
# CREATING MODULES INSTANCES
# CREATING MODULES INSTANCES
...
...
product/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py
View file @
78a8f52c
...
@@ -49,7 +49,7 @@ def ERP5Site_updateModuleScribus(self,
...
@@ -49,7 +49,7 @@ def ERP5Site_updateModuleScribus(self,
from
Products.ERP5Form.CreatePropertySheet
import
LocalGenerator
from
Products.ERP5Form.CreatePropertySheet
import
LocalGenerator
# importing module to get an access to the 'searchFolder' method
# importing module to get an access to the 'searchFolder' method
# needed to be able to list the objects in 'list_object_view' form
# needed to be able to list the objects in 'list_object_view' form
from
Products.ERP5.ERP5Site
import
ERP5Site
from
Products.ERP5
Type
.ERP5Site
import
ERP5Site
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.utils
import
getToolByName
from
zLOG
import
LOG
,
TRACE
,
WARNING
,
ERROR
,
INFO
from
zLOG
import
LOG
,
TRACE
,
WARNING
,
ERROR
,
INFO
...
...
product/ERP5Form/Form.py
View file @
78a8f52c
...
@@ -58,7 +58,7 @@ class FieldValueCacheDict(dict):
...
@@ -58,7 +58,7 @@ class FieldValueCacheDict(dict):
def
clear
(
self
):
def
clear
(
self
):
super
(
FieldValueCacheDict
,
self
).
clear
()
super
(
FieldValueCacheDict
,
self
).
clear
()
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
try
:
try
:
portal
=
getSite
()
portal
=
getSite
()
except
IndexError
:
except
IndexError
:
...
@@ -68,7 +68,7 @@ class FieldValueCacheDict(dict):
...
@@ -68,7 +68,7 @@ class FieldValueCacheDict(dict):
self
.
_last_sync
=
portal
.
getCacheCookie
(
'form_field_value_cache'
)
self
.
_last_sync
=
portal
.
getCacheCookie
(
'form_field_value_cache'
)
def
__getitem__
(
self
,
cache_id
):
def
__getitem__
(
self
,
cache_id
):
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
try
:
try
:
portal
=
getSite
()
portal
=
getSite
()
except
IndexError
:
except
IndexError
:
...
...
product/ERP5Form/ScribusUtils.py
View file @
78a8f52c
...
@@ -41,7 +41,7 @@ import random
...
@@ -41,7 +41,7 @@ import random
import
getopt
,
sys
,
os
,
re
import
getopt
,
sys
,
os
,
re
from
urllib
import
quote
from
urllib
import
quote
from
Products.ERP5.ERP5Site
import
ERP5Site
from
Products.ERP5
Type
.ERP5Site
import
ERP5Site
from
Products.Formulator.TALESField
import
TALESMethod
from
Products.Formulator.TALESField
import
TALESMethod
from
Products.Formulator.MethodField
import
Method
from
Products.Formulator.MethodField
import
Method
from
Products.ERP5Type.Utils
import
convertToUpperCase
from
Products.ERP5Type.Utils
import
convertToUpperCase
...
...
product/ERP5SyncML/Engine/AsynchronousEngine.py
View file @
78a8f52c
...
@@ -29,7 +29,7 @@ from logging import getLogger
...
@@ -29,7 +29,7 @@ from logging import getLogger
from
Products.ERP5SyncML.Engine.EngineMixin
import
EngineMixin
from
Products.ERP5SyncML.Engine.EngineMixin
import
EngineMixin
from
Products.ERP5SyncML.SyncMLConstant
import
ACTIVITY_PRIORITY
from
Products.ERP5SyncML.SyncMLConstant
import
ACTIVITY_PRIORITY
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
syncml_logger
=
getLogger
(
'ERP5SyncML'
)
syncml_logger
=
getLogger
(
'ERP5SyncML'
)
...
...
product/ERP5SyncML/Tool/SynchronizationTool.py
View file @
78a8f52c
...
@@ -38,7 +38,7 @@ from Products.ERP5SyncML.SyncMLConstant import ACTIVITY_PRIORITY, \
...
@@ -38,7 +38,7 @@ from Products.ERP5SyncML.SyncMLConstant import ACTIVITY_PRIORITY, \
from
Products.ERP5SyncML.SyncMLMessage
import
SyncMLRequest
from
Products.ERP5SyncML.SyncMLMessage
import
SyncMLRequest
from
Products.ERP5SyncML.Engine.SynchronousEngine
import
SyncMLSynchronousEngine
from
Products.ERP5SyncML.Engine.SynchronousEngine
import
SyncMLSynchronousEngine
from
Products.ERP5SyncML.Engine.AsynchronousEngine
import
SyncMLAsynchronousEngine
from
Products.ERP5SyncML.Engine.AsynchronousEngine
import
SyncMLAsynchronousEngine
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
synchronous_engine
=
SyncMLSynchronousEngine
()
synchronous_engine
=
SyncMLSynchronousEngine
()
asynchronous_engine
=
SyncMLAsynchronousEngine
()
asynchronous_engine
=
SyncMLAsynchronousEngine
()
...
...
product/ERP5SyncML/Transport/ERP5.py
View file @
78a8f52c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
class
ERP5Transport
:
class
ERP5Transport
:
"""
"""
...
...
product/ERP5SyncML/Transport/Mail.py
View file @
78a8f52c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
from
HTTP
import
ConnectionError
from
HTTP
import
ConnectionError
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
class
MailTransport
:
class
MailTransport
:
...
...
product/ERP5SyncML/XMLSyncUtils.py
View file @
78a8f52c
...
@@ -38,7 +38,7 @@ from ERP5Diff import ERP5Diff
...
@@ -38,7 +38,7 @@ from ERP5Diff import ERP5Diff
from
DateTime
import
DateTime
from
DateTime
import
DateTime
from
SyncMLConstant
import
SYNCML_NAMESPACE
,
NSMAP
,
MAX_LEN
from
SyncMLConstant
import
SYNCML_NAMESPACE
,
NSMAP
,
MAX_LEN
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
E
=
ElementMaker
(
namespace
=
SYNCML_NAMESPACE
,
nsmap
=
NSMAP
)
E
=
ElementMaker
(
namespace
=
SYNCML_NAMESPACE
,
nsmap
=
NSMAP
)
parser
=
etree
.
XMLParser
(
remove_blank_text
=
True
)
parser
=
etree
.
XMLParser
(
remove_blank_text
=
True
)
...
...
product/ERP5TioSafe/ConnectionPlugin/DocumentConnection.py
View file @
78a8f52c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
##############################################################################
##############################################################################
from
Products.ERP5Type.Tool.WebServiceTool
import
ConnectionError
from
Products.ERP5Type.Tool.WebServiceTool
import
ConnectionError
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
class
MethodWrapper
(
object
):
class
MethodWrapper
(
object
):
...
...
product/ERP5Type/Base.py
View file @
78a8f52c
...
@@ -353,7 +353,7 @@ def _aq_reset():
...
@@ -353,7 +353,7 @@ def _aq_reset():
# Callers expect to re-generates accessors right now, so call
# Callers expect to re-generates accessors right now, so call
# resetDynamicDocuments to maintain backward-compatibility
# resetDynamicDocuments to maintain backward-compatibility
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
getSite
().
portal_types
.
resetDynamicDocuments
()
getSite
().
portal_types
.
resetDynamicDocuments
()
class
PropertyHolder
(
object
):
class
PropertyHolder
(
object
):
...
...
product/ERP5Type/ConnectionPlugin/SQLConnection.py
View file @
78a8f52c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
##############################################################################
##############################################################################
from
Products.ERP5Type.Tool.WebServiceTool
import
ConnectionError
from
Products.ERP5Type.Tool.WebServiceTool
import
ConnectionError
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
class
MethodWrapper
(
object
):
class
MethodWrapper
(
object
):
...
...
product/ERP5
/Document
/BaseCategory.py
→
product/ERP5
Type/Core
/BaseCategory.py
View file @
78a8f52c
File moved
product/ERP5Type/Core/StandardProperty.py
View file @
78a8f52c
...
@@ -232,7 +232,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
...
@@ -232,7 +232,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
@param kind: 'min' or 'max'
@param kind: 'min' or 'max'
@type kind: string
@type kind: string
@param portal: Portal object
@param portal: Portal object
@type portal: Products.ERP5.ERP5Site.ERP5Site
@type portal: Products.ERP5
Type
.ERP5Site.ERP5Site
"""
"""
property_dict
[
'reference'
]
=
'%s_range_%s'
%
(
property_dict
[
'reference'
],
property_dict
[
'reference'
]
=
'%s_range_%s'
%
(
property_dict
[
'reference'
],
kind
)
kind
)
...
@@ -281,7 +281,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
...
@@ -281,7 +281,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
@param accessor_holder: Accessor holder to applied the accessors on
@param accessor_holder: Accessor holder to applied the accessors on
@type accessor_holder: Products.ERP5Type.dynamic.accessor_holder.AccessorHolderType
@type accessor_holder: Products.ERP5Type.dynamic.accessor_holder.AccessorHolderType
@param portal: Portal object
@param portal: Portal object
@type portal: Products.ERP5.ERP5Site.ERP5Site
@type portal: Products.ERP5
Type
.ERP5Site.ERP5Site
"""
"""
try
:
try
:
localizer
=
portal
.
_getOb
(
'Localizer'
)
localizer
=
portal
.
_getOb
(
'Localizer'
)
...
@@ -498,7 +498,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
...
@@ -498,7 +498,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
@param accessor_holder: Accessor holder to applied the accessors on
@param accessor_holder: Accessor holder to applied the accessors on
@type accessor_holder: Products.ERP5Type.dynamic.accessor_holder.AccessorHolderType
@type accessor_holder: Products.ERP5Type.dynamic.accessor_holder.AccessorHolderType
@param portal: Portal object
@param portal: Portal object
@type portal: Products.ERP5.ERP5Site.ERP5Site
@type portal: Products.ERP5
Type
.ERP5Site.ERP5Site
@param do_register: Register the property in the Zope property map
@param do_register: Register the property in the Zope property map
@type do_register: bool
@type do_register: bool
"""
"""
...
@@ -637,7 +637,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
...
@@ -637,7 +637,7 @@ class StandardProperty(IdAsReferenceMixin('_property'), XMLObject):
@param expression_context: Expression context for TALES Expression
@param expression_context: Expression context for TALES Expression
@type expression_context: Products.PageTemplates.Expressions.ZopeContext
@type expression_context: Products.PageTemplates.Expressions.ZopeContext
@param portal: Portal object
@param portal: Portal object
@type portal: Products.ERP5.ERP5Site.ERP5Site
@type portal: Products.ERP5
Type
.ERP5Site.ERP5Site
@see applyDefinitionOnAccessorHolder
@see applyDefinitionOnAccessorHolder
"""
"""
...
...
product/ERP5/ERP5Defaults.py
→
product/ERP5
Type
/ERP5Defaults.py
View file @
78a8f52c
File moved
product/ERP5/ERP5Site.py
→
product/ERP5
Type
/ERP5Site.py
View file @
78a8f52c
File moved
product/ERP5Type/Message.py
View file @
78a8f52c
...
@@ -134,7 +134,7 @@ class Message(Persistent):
...
@@ -134,7 +134,7 @@ class Message(Persistent):
message
=
message
.
encode
(
'utf-8'
)
message
=
message
.
encode
(
'utf-8'
)
message
=
Template
(
message
).
substitute
(
self
.
mapping
)
message
=
Template
(
message
).
substitute
(
self
.
mapping
)
else
:
else
:
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
request
=
Globals
.
get_request
()
request
=
Globals
.
get_request
()
translation_service
=
getGlobalTranslationService
()
translation_service
=
getGlobalTranslationService
()
if
self
.
mapping
:
if
self
.
mapping
:
...
...
product/ERP5Type/Tool/BaseTool.py
View file @
78a8f52c
...
@@ -80,7 +80,7 @@ class BaseTool (UniqueObject, Folder):
...
@@ -80,7 +80,7 @@ class BaseTool (UniqueObject, Folder):
# Tools are causing problems: they used to have no type_class, or wrong
# Tools are causing problems: they used to have no type_class, or wrong
# type_class, or sometimes have no type definitions at all.
# type_class, or sometimes have no type definitions at all.
# Fix type definition if possible before any migration.
# Fix type definition if possible before any migration.
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
types_tool
=
getSite
().
portal_types
types_tool
=
getSite
().
portal_types
type_definition
=
getattr
(
types_tool
,
portal_type
,
None
)
type_definition
=
getattr
(
types_tool
,
portal_type
,
None
)
if
type_definition
is
not
None
and
\
if
type_definition
is
not
None
and
\
...
...
product/ERP5/Tool/CategoryTool.py
→
product/ERP5
Type
/Tool/CategoryTool.py
View file @
78a8f52c
File moved
product/ERP5Type/Tool/PropertySheetTool.py
View file @
78a8f52c
...
@@ -78,7 +78,7 @@ class PropertySheetTool(BaseTool):
...
@@ -78,7 +78,7 @@ class PropertySheetTool(BaseTool):
def
_bootstrap
(
self
):
def
_bootstrap
(
self
):
bt_name
=
'erp5_property_sheets'
bt_name
=
'erp5_property_sheets'
from
Products.ERP5.ERP5Site
import
ERP5Generator
from
Products.ERP5
Type
.ERP5Site
import
ERP5Generator
content_path_list
=
[
content_path_list
=
[
'BaseType'
,
'BaseType'
,
'BusinessTemplate'
,
'BusinessTemplate'
,
...
@@ -103,7 +103,7 @@ class PropertySheetTool(BaseTool):
...
@@ -103,7 +103,7 @@ class PropertySheetTool(BaseTool):
template_tool
=
portal
.
aq_base
.
__of__
(
portal
.
aq_parent
.
__of__
(
template_tool
=
portal
.
aq_base
.
__of__
(
portal
.
aq_parent
.
__of__
(
RequestContainer
(
REQUEST
=
get_request
()))).
portal_templates
RequestContainer
(
REQUEST
=
get_request
()))).
portal_templates
if
template_tool
.
getInstalledBusinessTemplate
(
bt_name
)
is
None
:
if
template_tool
.
getInstalledBusinessTemplate
(
bt_name
)
is
None
:
from
Products.ERP5.ERP5Site
import
getBootstrapBusinessTemplateUrl
from
Products.ERP5
Type
.ERP5Site
import
getBootstrapBusinessTemplateUrl
url
=
getBootstrapBusinessTemplateUrl
(
bt_name
)
url
=
getBootstrapBusinessTemplateUrl
(
bt_name
)
template_tool
.
download
(
url
).
install
()
template_tool
.
download
(
url
).
install
()
transaction
.
get
().
addBeforeCommitHook
(
unrestricted_apply
,
(
install
,))
transaction
.
get
().
addBeforeCommitHook
(
unrestricted_apply
,
(
install
,))
...
...
product/ERP5Type/Tool/TypesTool.py
View file @
78a8f52c
...
@@ -123,7 +123,7 @@ class TypesTool(TypeProvider):
...
@@ -123,7 +123,7 @@ class TypesTool(TypeProvider):
return
False
return
False
def
_bootstrap
(
self
):
def
_bootstrap
(
self
):
from
Products.ERP5.ERP5Site
import
ERP5Generator
from
Products.ERP5
Type
.ERP5Site
import
ERP5Generator
ERP5Generator
.
bootstrap
(
self
,
'erp5_core'
,
'PortalTypeTemplateItem'
,
(
ERP5Generator
.
bootstrap
(
self
,
'erp5_core'
,
'PortalTypeTemplateItem'
,
(
'Business Template'
,
'Business Template'
,
'Standard Property'
,
'Standard Property'
,
...
@@ -158,7 +158,14 @@ class TypesTool(TypeProvider):
...
@@ -158,7 +158,14 @@ class TypesTool(TypeProvider):
for
provider
in
self
.
type_provider_list
:
for
provider
in
self
.
type_provider_list
:
provider_value
=
_getOb
(
provider
,
None
)
provider_value
=
_getOb
(
provider
,
None
)
if
provider_value
is
not
None
:
if
provider_value
is
not
None
:
type_info_list
+=
listTypeInfo
(
provider_value
,
container
=
container
)
try
:
type_info_list
+=
listTypeInfo
(
provider_value
,
container
=
container
)
except
TypeError
:
# DO NOT COMMIT: Products.ERP5.Tool.SolverTool, should be there
# after installing ERP5 products later or should it be moved to
# Products.ERP5Type?
pass
return
type_info_list
return
type_info_list
def
_aq_dynamic
(
self
,
id
):
def
_aq_dynamic
(
self
,
id
):
...
...
product/ERP5Type/UnrestrictedMethod.py
View file @
78a8f52c
...
@@ -101,7 +101,7 @@ def super_user():
...
@@ -101,7 +101,7 @@ def super_user():
uf
=
user
.
aq_inner
.
aq_parent
uf
=
user
.
aq_inner
.
aq_parent
except
AttributeError
:
except
AttributeError
:
# XXX: local imports are bad, getSite should be moved to ERP5Type.
# XXX: local imports are bad, getSite should be moved to ERP5Type.
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
uf
=
getSite
().
acl_users
uf
=
getSite
().
acl_users
role_list
=
uf
.
valid_roles
()
role_list
=
uf
.
valid_roles
()
if
anonymous
:
if
anonymous
:
...
...
product/ERP5Type/Utils.py
View file @
78a8f52c
...
@@ -1097,7 +1097,7 @@ def registerDocumentClass(module_name, class_name):
...
@@ -1097,7 +1097,7 @@ def registerDocumentClass(module_name, class_name):
LOG
(
'Utils'
,
WARNING
,
LOG
(
'Utils'
,
WARNING
,
"Ignoring replacement of %s by %s"
%
(
old_value
,
new_value
))
"Ignoring replacement of %s by %s"
%
(
old_value
,
new_value
))
return
return
assert
module_name
==
'Products.ERP5.Tool.CategoryTool'
,
module_name
assert
module_name
==
'Products.ERP5
Type
.Tool.CategoryTool'
,
module_name
LOG
(
'Utils'
,
WARNING
,
"Replacing %s by %s"
%
(
old_value
,
new_value
))
LOG
(
'Utils'
,
WARNING
,
"Replacing %s by %s"
%
(
old_value
,
new_value
))
else
:
else
:
raise
Exception
(
"Class %s and %s from different products have the "
raise
Exception
(
"Class %s and %s from different products have the "
...
...
product/ERP5Type/__init__.py
View file @
78a8f52c
...
@@ -90,14 +90,15 @@ def initialize( context ):
...
@@ -90,14 +90,15 @@ def initialize( context ):
# Import Product Components
# Import Product Components
from
Tool
import
(
CacheTool
,
MemcachedTool
,
SessionTool
,
from
Tool
import
(
CacheTool
,
MemcachedTool
,
SessionTool
,
TypesTool
,
WebServiceTool
,
PropertySheetTool
,
TypesTool
,
WebServiceTool
,
PropertySheetTool
,
ComponentTool
)
ComponentTool
,
CategoryTool
)
import
Document
import
Document
from
Base
import
Base
from
Base
import
Base
import
XMLObject
import
XMLObject
from
ERP5Type
import
ERP5TypeInformation
from
ERP5Type
import
ERP5TypeInformation
import
CodingStyle
import
CodingStyle
# Define documents, classes, constructors and tools
# Define documents, classes, constructors and tools
object_classes
=
()
import
ERP5Site
object_classes
=
(
ERP5Site
.
ERP5Site
,)
content_constructors
=
()
content_constructors
=
()
content_classes
=
(
Base
,
content_classes
=
(
Base
,
XMLObject
.
XMLObject
,
XMLObject
.
XMLObject
,
...
@@ -108,7 +109,8 @@ def initialize( context ):
...
@@ -108,7 +109,8 @@ def initialize( context ):
TypesTool
.
TypesTool
,
TypesTool
.
TypesTool
,
WebServiceTool
.
WebServiceTool
,
WebServiceTool
.
WebServiceTool
,
PropertySheetTool
.
PropertySheetTool
,
PropertySheetTool
.
PropertySheetTool
,
ComponentTool
.
ComponentTool
ComponentTool
.
ComponentTool
,
CategoryTool
.
CategoryTool
)
)
# Do initialization step
# Do initialization step
initializeProduct
(
context
,
this_module
,
globals
(),
initializeProduct
(
context
,
this_module
,
globals
(),
...
...
product/ERP5/dtml/addERP5Site.dtml
→
product/ERP5
Type
/dtml/addERP5Site.dtml
View file @
78a8f52c
File moved
product/ERP5/dtml/addPortal.dtml
→
product/ERP5
Type
/dtml/addPortal.dtml
View file @
78a8f52c
File moved
product/ERP5Type/dynamic/component_package.py
View file @
78a8f52c
...
@@ -34,7 +34,7 @@ import sys
...
@@ -34,7 +34,7 @@ import sys
import
imp
import
imp
import
collections
import
collections
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
from
.
import
aq_method_lock
from
.
import
aq_method_lock
from
types
import
ModuleType
from
types
import
ModuleType
from
zLOG
import
LOG
,
BLATHER
,
WARNING
from
zLOG
import
LOG
,
BLATHER
,
WARNING
...
...
product/ERP5Type/dynamic/lazy_class.py
View file @
78a8f52c
...
@@ -343,7 +343,7 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
...
@@ -343,7 +343,7 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
" class hierarchy"
)
" class hierarchy"
)
portal_type
=
klass
.
__name__
portal_type
=
klass
.
__name__
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
site
=
getSite
()
site
=
getSite
()
with
aq_method_lock
:
with
aq_method_lock
:
try
:
try
:
...
...
product/ERP5Type/dynamic/persistent_migration.py
View file @
78a8f52c
...
@@ -156,7 +156,7 @@ class PickleUpdater(ObjectReader, ObjectWriter, object):
...
@@ -156,7 +156,7 @@ class PickleUpdater(ObjectReader, ObjectWriter, object):
if
1
:
if
1
:
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5Type.Core.Folder
import
Folder
from
Products.ERP5.Tool.CategoryTool
import
CategoryTool
from
Products.ERP5
Type
.Tool.CategoryTool
import
CategoryTool
Base__setstate__
=
Base
.
__setstate__
Base__setstate__
=
Base
.
__setstate__
...
...
product/ERP5Type/interfaces/__init__.py
View file @
78a8f52c
...
@@ -10,3 +10,5 @@ from value_access_provider import IValueAccessProvider
...
@@ -10,3 +10,5 @@ from value_access_provider import IValueAccessProvider
from
constraint
import
IConstraint
from
constraint
import
IConstraint
from
role_provider
import
ILocalRoleAssignor
,
ILocalRoleGenerator
from
role_provider
import
ILocalRoleAssignor
,
ILocalRoleGenerator
from
types_tool
import
ITypesTool
,
ITypeProvider
from
types_tool
import
ITypesTool
,
ITypeProvider
from
property_recordable
import
IPropertyRecordable
from
predicate
import
IPredicate
product/ERP5/interfaces/predicate.py
→
product/ERP5
Type
/interfaces/predicate.py
View file @
78a8f52c
File moved
product/ERP5/interfaces/property_recordable.py
→
product/ERP5
Type
/interfaces/property_recordable.py
View file @
78a8f52c
File moved
product/ERP5Type/mixin/component.py
View file @
78a8f52c
...
@@ -34,7 +34,7 @@ from __future__ import absolute_import
...
@@ -34,7 +34,7 @@ from __future__ import absolute_import
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5Type.Globals
import
InitializeClass
from
Products.ERP5.mixin.property_recordable
import
PropertyRecordableMixin
from
Products.ERP5
Type
.mixin.property_recordable
import
PropertyRecordableMixin
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Accessor.Constant
import
PropertyGetter
as
ConstantGetter
from
Products.ERP5Type.Accessor.Constant
import
PropertyGetter
as
ConstantGetter
...
...
product/ERP5/mixin/property_recordable.py
→
product/ERP5
Type
/mixin/property_recordable.py
View file @
78a8f52c
File moved
product/ERP5Type/patches/CMFCoreUtils.py
View file @
78a8f52c
...
@@ -73,7 +73,7 @@ def manage_addToolForm(self, REQUEST):
...
@@ -73,7 +73,7 @@ def manage_addToolForm(self, REQUEST):
""" Show the add tool form.
""" Show the add tool form.
"""
"""
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
import
erp5.component.tool
import
erp5.component.tool
seen_tool_component_set
=
set
()
seen_tool_component_set
=
set
()
for
tool_component
in
getSite
().
portal_components
.
objectValues
(
portal_type
=
'Tool Component'
):
for
tool_component
in
getSite
().
portal_components
.
objectValues
(
portal_type
=
'Tool Component'
):
...
...
product/ERP5Type/patches/ExceptionFormatter.py
View file @
78a8f52c
...
@@ -65,7 +65,7 @@ def formatLine(self, tb, *args, **kwargs):
...
@@ -65,7 +65,7 @@ def formatLine(self, tb, *args, **kwargs):
f_globals
=
f
.
f_globals
f_globals
=
f
.
f_globals
line_str
=
HTMLExceptionFormatter_formatLine
(
self
,
tb
,
*
args
,
**
kwargs
)
line_str
=
HTMLExceptionFormatter_formatLine
(
self
,
tb
,
*
args
,
**
kwargs
)
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
try
:
try
:
portal_absolute_url
=
getSite
().
absolute_url
()
portal_absolute_url
=
getSite
().
absolute_url
()
...
...
product/ERP5Type/patches/pylint.py
View file @
78a8f52c
...
@@ -115,7 +115,7 @@ MANAGER.register_transform(nodes.Module,
...
@@ -115,7 +115,7 @@ MANAGER.register_transform(nodes.Module,
lambda
n
:
n
.
name
==
'erp5'
)
lambda
n
:
n
.
name
==
'erp5'
)
def
_buildAstroidModuleFromComponentModuleName
(
modname
):
def
_buildAstroidModuleFromComponentModuleName
(
modname
):
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
from
Acquisition
import
aq_base
from
Acquisition
import
aq_base
portal
=
getSite
()
portal
=
getSite
()
component_tool
=
aq_base
(
portal
.
portal_components
)
component_tool
=
aq_base
(
portal
.
portal_components
)
...
...
product/ERP5/portal.gif
→
product/ERP5
Type
/portal.gif
View file @
78a8f52c
File moved
product/ERP5Type/tests/CodingStyleTest.py
View file @
78a8f52c
...
@@ -63,7 +63,7 @@ class CodingStyleTest(CodingStyleTestCase, testXHTML.TestXHTMLMixin):
...
@@ -63,7 +63,7 @@ class CodingStyleTest(CodingStyleTestCase, testXHTML.TestXHTMLMixin):
"""
"""
template_tool
=
self
.
portal
.
portal_templates
template_tool
=
self
.
portal
.
portal_templates
from
Products.ERP5.ERP5Site
import
getBootstrapDirectory
from
Products.ERP5
Type
.ERP5Site
import
getBootstrapDirectory
bt5_path_list
=
[
os
.
environ
.
get
(
'erp5_tests_bootstrap_path'
)
or
bt5_path_list
=
[
os
.
environ
.
get
(
'erp5_tests_bootstrap_path'
)
or
getBootstrapDirectory
()]
getBootstrapDirectory
()]
for
path
in
os
.
environ
[
'erp5_tests_bt5_path'
].
split
(
','
):
for
path
in
os
.
environ
[
'erp5_tests_bt5_path'
].
split
(
','
):
...
...
product/ERP5Type/tests/ERP5TypeLiveTestCase.py
View file @
78a8f52c
...
@@ -82,7 +82,7 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
...
@@ -82,7 +82,7 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
if
self
.
portal
is
not
None
:
if
self
.
portal
is
not
None
:
return
self
.
portal
return
self
.
portal
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
site
=
getSite
()
site
=
getSite
()
# reconstruct the acquistion chain with an independant request.
# reconstruct the acquistion chain with an independant request.
# RequestContainer -> Application -> Site
# RequestContainer -> Application -> Site
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
78a8f52c
...
@@ -1192,7 +1192,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -1192,7 +1192,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
ZopeTestCase
.
_print
(
'Adding %s ERP5 Site ... '
%
portal_name
)
ZopeTestCase
.
_print
(
'Adding %s ERP5 Site ... '
%
portal_name
)
kw
=
self
.
_getSiteCreationParameterDict
()
kw
=
self
.
_getSiteCreationParameterDict
()
factory
=
app
.
manage_addProduct
[
'ERP5'
]
factory
=
app
.
manage_addProduct
[
'ERP5
Type
'
]
factory
.
manage_addERP5Site
(
portal_name
,
factory
.
manage_addERP5Site
(
portal_name
,
erp5_catalog_storage
=
erp5_catalog_storage
,
erp5_catalog_storage
=
erp5_catalog_storage
,
light_install
=
light_install
,
light_install
=
light_install
,
...
@@ -1319,7 +1319,7 @@ class ERP5TypeTestCase(ERP5TypeCommandLineTestCase):
...
@@ -1319,7 +1319,7 @@ class ERP5TypeTestCase(ERP5TypeCommandLineTestCase):
This TestCase setups an ERP5Site and installs business templates.
This TestCase setups an ERP5Site and installs business templates.
"""
"""
from
Products.ERP5
import
ERP5Site
from
Products.ERP5
Type
import
ERP5Site
ERP5Site
.
getBootstrapBusinessTemplateUrl
=
lambda
bt_title
:
\
ERP5Site
.
getBootstrapBusinessTemplateUrl
=
lambda
bt_title
:
\
ERP5TypeCommandLineTestCase
.
_getBTPathAndIdList
((
bt_title
,))[
0
][
0
]
ERP5TypeCommandLineTestCase
.
_getBTPathAndIdList
((
bt_title
,))[
0
][
0
]
...
...
product/ERP5Type/tests/custom_zodb.py
View file @
78a8f52c
...
@@ -66,7 +66,7 @@ else:
...
@@ -66,7 +66,7 @@ else:
# must be cleared of data from previous execution if any
# must be cleared of data from previous execution if any
_print
(
"Catalog will be recreated to clear data (if any) from previous execution"
)
_print
(
"Catalog will be recreated to clear data (if any) from previous execution"
)
import
Products.ZMySQLDA.db
import
Products.ZMySQLDA.db
from
Products.ERP5.ERP5Site
import
default_sql_connection_string
from
Products.ERP5
Type
.ERP5Site
import
default_sql_connection_string
sql_db
=
Products
.
ZMySQLDA
.
db
.
DB
(
os
.
environ
.
get
(
'erp5_sql_connection_string'
,
sql_db
=
Products
.
ZMySQLDA
.
db
.
DB
(
os
.
environ
.
get
(
'erp5_sql_connection_string'
,
default_sql_connection_string
))
default_sql_connection_string
))
...
...
product/ERP5Type/tests/runUnitTest.py
View file @
78a8f52c
...
@@ -406,7 +406,7 @@ class ERP5TypeTestLoader(unittest.TestLoader):
...
@@ -406,7 +406,7 @@ class ERP5TypeTestLoader(unittest.TestLoader):
"""
"""
template_tool
=
self
.
portal
.
portal_templates
template_tool
=
self
.
portal
.
portal_templates
from
Products.ERP5.ERP5Site
import
getBootstrapDirectory
from
Products.ERP5
Type
.ERP5Site
import
getBootstrapDirectory
bt5_path_list
=
[
os
.
environ
.
get
(
'erp5_tests_bootstrap_path'
)
or
bt5_path_list
=
[
os
.
environ
.
get
(
'erp5_tests_bootstrap_path'
)
or
getBootstrapDirectory
()]
getBootstrapDirectory
()]
for
path
in
os
.
environ
[
'erp5_tests_bt5_path'
].
split
(
','
):
for
path
in
os
.
environ
[
'erp5_tests_bt5_path'
].
split
(
','
):
...
...
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
78a8f52c
...
@@ -1183,7 +1183,7 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
...
@@ -1183,7 +1183,7 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
con
=
db
.
open
(
transaction_manager
=
tm
)
con
=
db
.
open
(
transaction_manager
=
tm
)
app
=
con
.
root
()[
'Application'
].
__of__
(
self
.
app
.
aq_parent
)
app
=
con
.
root
()[
'Application'
].
__of__
(
self
.
app
.
aq_parent
)
portal
=
app
[
self
.
getPortalName
()]
portal
=
app
[
self
.
getPortalName
()]
from
Products.ERP5.ERP5Site
import
getSite
,
setSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
,
setSite
old_site
=
getSite
()
old_site
=
getSite
()
setSite
(
portal
)
setSite
(
portal
)
...
@@ -2885,7 +2885,7 @@ class Test(ERP5TypeTestCase):
...
@@ -2885,7 +2885,7 @@ class Test(ERP5TypeTestCase):
"""
"""
ret
=
ERP5TypeTestLoader_loadTestsFromNames
(
self
,
*
args
,
**
kwargs
)
ret
=
ERP5TypeTestLoader_loadTestsFromNames
(
self
,
*
args
,
**
kwargs
)
from
Products.ERP5.ERP5Site
import
getSite
from
Products.ERP5
Type
.ERP5Site
import
getSite
getSite
().
portal_components
.
reset
(
force
=
True
)
getSite
().
portal_components
.
reset
(
force
=
True
)
# Simulate a new REQUEST while the old one has been GC'ed
# Simulate a new REQUEST while the old one has been GC'ed
...
...
product/ERP5Wizard/tests/testERP5RemoteUserManager.py
View file @
78a8f52c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
##############################################################################
##############################################################################
from
AccessControl.SecurityManagement
import
newSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5.ERP5Site
import
ERP5Site
from
Products.ERP5
Type
.ERP5Site
import
ERP5Site
from
Products
import
ERP5Security
from
Products
import
ERP5Security
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.Base
import
Base
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment