diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py index 263e420489e8734a2e2717a2d0d714dda525aeb5..a0ebb1c25f64e4a4ddbe422e63ecb18cc2f3a46b 100644 --- a/product/ERP5/ERP5Site.py +++ b/product/ERP5/ERP5Site.py @@ -1717,9 +1717,7 @@ class ERP5Generator(PortalGenerator): for t in BusinessTemplate,: t = t.factory_type_information if not tool.hasObject(t['id']): - tool._setObject(t['id'], - ERP5TypeInformation(portal_type=ERP5TypeInformation.portal_type, - uid=None, **t)) + tool._setObject(t['id'], ERP5TypeInformation(uid=None, **t)) def setupERP5Core(self,p,**kw): """ diff --git a/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Action%20Information.xml b/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Action%20Information.xml index f59b8273db1a3d2f1221cec43bc86c5d867095c1..f9efa8d70d6e403f5690b341a986d71299b97d08 100644 --- a/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Action%20Information.xml +++ b/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Action%20Information.xml @@ -17,10 +17,6 @@ <key> <string>allow_discussion</string> </key> <value> <int>1</int> </value> </item> - <item> - <key> <string>content_meta_type</string> </key> - <value> <string>ERP5 Action Information</string> </value> - </item> <item> <key> <string>description</string> </key> <value> <string>Action Information...</string> </value> diff --git a/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Base%20Type.xml b/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Base%20Type.xml index cb3858f7f0a797ffd2421b2cea679a601cd461b7..84fd235508a12a7219c4977275180c971386ad66 100644 --- a/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Base%20Type.xml +++ b/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Base%20Type.xml @@ -32,14 +32,6 @@ <key> <string>acquire_local_roles</string> </key> <value> <int>1</int> </value> </item> - <item> - <key> <string>content_icon</string> </key> - <value> <string>typeinfo.gif</string> </value> - </item> - <item> - <key> <string>content_meta_type</string> </key> - <value> <string>ERP5 Type Information</string> </value> - </item> <item> <key> <string>description</string> </key> <value> <string>Portal Type is the meta portal type information for all standard portal types in ERP5.</string> </value> diff --git a/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Types%20Tool.xml b/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Types%20Tool.xml index d3d96ee0b833c0d41555e7b9bda99ecb84a4cfe7..f4cad238f7f8bd0b17cab41dbbe773ad3bb5c6ae 100644 --- a/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Types%20Tool.xml +++ b/product/ERP5/bootstrap/erp5_type/PortalTypeTemplateItem/portal_types/Types%20Tool.xml @@ -32,14 +32,6 @@ <key> <string>acquire_local_roles</string> </key> <value> <int>0</int> </value> </item> - <item> - <key> <string>content_icon</string> </key> - <value> <string>folder_icon.gif</string> </value> - </item> - <item> - <key> <string>content_meta_type</string> </key> - <value> <string>ERP5 Folder</string> </value> - </item> <item> <key> <string>description</string> </key> <value> <string>The Types Tool centralises all portal type definitions.</string> </value> diff --git a/product/ERP5/bootstrap/erp5_type/bt/revision b/product/ERP5/bootstrap/erp5_type/bt/revision index 7c6ba0fe181de786f8f09b1b8cc1ad6bbc1dd5a4..f0b5c72cad2a31240e128db4bc833e782855f796 100644 --- a/product/ERP5/bootstrap/erp5_type/bt/revision +++ b/product/ERP5/bootstrap/erp5_type/bt/revision @@ -1 +1 @@ -55 \ No newline at end of file +57 \ No newline at end of file diff --git a/product/ERP5Type/Core/ActionInformation.py b/product/ERP5Type/Core/ActionInformation.py index 366a09d874dc44e8a3708e4709d7a3f7729fd59e..8cefae8aa1024264e63e09ef6a97907a08533649 100644 --- a/product/ERP5Type/Core/ActionInformation.py +++ b/product/ERP5Type/Core/ActionInformation.py @@ -112,12 +112,12 @@ class ActionInformation(XMLObject): security.declareProtected(AccessContentsInformation, 'PrincipiaSearchSource') def PrincipiaSearchSource(self): # Support for "Find" tab in ZMI - search_source_list = [self.getId(), + search_source_list = [self.getReference(), self.getTitle(), self.getDescription(), self.getActionText(), self.getConditionText()] - return ' '.join(search_source_list) + return ' '.join(filter(None, search_source_list)) # # XXX CMF compatibility @@ -143,7 +143,7 @@ class ActionInformation(XMLObject): def getMapping(self): """ Get a mapping of this object's data. """ - return { 'id': self.getId(), + return { 'id': self.getReference(), 'title': self.getTitle(), 'description': self.getDescription(), 'category': self.getActionType(), @@ -160,9 +160,3 @@ class ActionInformation(XMLObject): so that 'action_expression' property can be renamed to 'action'. """ return ActionInfo(self, ec) - -# def Title(self): -# return self.getTitle() -# -# def Description(self): -# return self.getDescription() diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py index 226fbfbe3ca6a4bfa8e4ce61839088e7fae28f78..9554e9bbd26cc4f5ffca3e20a8962cd9ac0e15c3 100644 --- a/product/ERP5Type/ERP5Type.py +++ b/product/ERP5Type/ERP5Type.py @@ -23,7 +23,6 @@ from Globals import InitializeClass, DTMLFile from AccessControl import ClassSecurityInfo, getSecurityManager from Acquisition import aq_base, aq_inner, aq_parent -from zExceptions import BadRequest import Products import Products.CMFCore.TypesTool @@ -596,7 +595,7 @@ class ERP5TypeInformation(XMLObject, self.getTypeInitScriptId()] search_source_list += self.getTypePropertySheetList(()) search_source_list += self.getTypeBaseCategoryList(()) - return ' '.join(search_source_list) + return ' '.join(filter(None, search_source_list)) # # USE_BASE_TYPE diff --git a/product/ERP5Type/TranslationProviderBase.py b/product/ERP5Type/TranslationProviderBase.py index 7377ca1061f75933363459f793b44c17b382f4c1..7201e0f1a850d86315fdea36c1d3ac0d6d3d7e8c 100644 --- a/product/ERP5Type/TranslationProviderBase.py +++ b/product/ERP5Type/TranslationProviderBase.py @@ -107,7 +107,7 @@ class TranslationProviderBase: original_property_domain_keys.sort() # Only update if required in order to prevent ZODB from growing - if original_property_domain_dict is None or\ + if original_property_domain_dict is None or \ property_domain_keys != original_property_domain_keys: # Update existing dict property_domain_dict.update(original_property_domain_dict) diff --git a/product/ERP5Type/patches/ActionInformation.py b/product/ERP5Type/patches/ActionInformation.py index e53f5ceda35ee78b71908c0c2f62055c21600373..9067872977b897f60ba05ef0b823d0c74174f45c 100644 --- a/product/ERP5Type/patches/ActionInformation.py +++ b/product/ERP5Type/patches/ActionInformation.py @@ -170,7 +170,7 @@ try: original_init(self, action, ec) if not isinstance(action, dict): # ivan - if self.data.get('icon', None) is not None: + if self.data.get('icon') is not None: self.data['icon'] = self._getIcon self._lazy_keys.append('icon') else: diff --git a/product/ERP5Type/patches/CMFCoreUtils.py b/product/ERP5Type/patches/CMFCoreUtils.py index ffc9ffc0294a643bf805c40a093475e271d3e01b..f00372cb0c4b0545c38b71103de005d76b896218 100644 --- a/product/ERP5Type/patches/CMFCoreUtils.py +++ b/product/ERP5Type/patches/CMFCoreUtils.py @@ -45,7 +45,7 @@ def CMFCoreUtils_getViewFor(obj, view='view'): for action in actions: # portal_types hack action_type = action.getActionType() - reference = getattr(action, 'reference', None) or action.id + reference = getattr(action, 'reference', action.id) if reference == view or action_type.endswith('_%s' % view): # Patch 2: consider anything ending by _view if _verifyActionPermissions(obj, action): if action.isVisible() and action.testCondition(test_context): # Patch 3: test actions