diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 37266171416a250a9eadfeff5e7a9f904280db90..b45622c0381b2e795c5b0389076a1487b1b672bf 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -4968,9 +4968,14 @@ Business Template is a set of definitions, such as skins, portal types and categ self._catalog_local_role_key_item = \ CatalogLocalRoleKeyTemplateItem( self.getTemplateCatalogLocalRoleKeyList()) - self._catalog_security_uid_column_item = \ + try: + self._catalog_security_uid_column_item = \ CatalogSecurityUidColumnTemplateItem( self.getTemplateCatalogSecurityUidColumnList()) + except AttributeError: + # be backwards compatible with old zope instances which + # do not contain recent version of erp5_property_sheets + pass security.declareProtected(Permissions.ManagePortal, 'build') def build(self, no_action=0): @@ -5584,7 +5589,12 @@ Business Template is a set of definitions, such as skins, portal types and categ (SimpleItem.SimpleItem,), {'__module__': module_id})) for item_name in self._item_name_list: - getattr(self, item_name).importFile(bta) + item_object = getattr(self, item_name) + # this check is due to backwards compatability when there can be a + # difference between install erp5_property_sheets (esp. BusinessTemplate + # property sheet) + if item_object is not None: + item_object.importFile(bta) # Remove temporary modules created above to allow import of real modules # (during the installation). diff --git a/product/ERP5Catalog/CatalogTool.py b/product/ERP5Catalog/CatalogTool.py index e8e3e2e70336f6e7272cc80d81694561539a2550..3e15e1720d614ec53747ec440e3e32f7cac5dd3f 100644 --- a/product/ERP5Catalog/CatalogTool.py +++ b/product/ERP5Catalog/CatalogTool.py @@ -515,8 +515,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): try: local_roles_group_id = brain.local_roles_group_id except AttributeError: - LOG("ERP5Catalog", PROBLEM, - "sql_search_security is not up to date, falling back.") + # backwards compatability in cases when catalog use default schema local_roles_group_id = '' security_uid_dict.setdefault(local_roles_group_id, []).append(brain.uid)