Commit cff571f7 authored by Arnaud Fontaine's avatar Arnaud Fontaine Committed by Cédric Le Ninivin

ZODB Components: Backward compatibility with instances before ZODB Interfaces/Mixins (e84d2b51).

e84d2b51 introduced template_{interface,mixin}_id BusinessTemplate properties
in erp5_property_sheets without keeping backward compatibility and thus
preventing update:
  Module Products.ERP5.Tool.TemplateTool, line 1446, in upgradeSite
    update_catalog=update_catalog)
  Module Products.ERP5.Tool.TemplateTool, line 1289, in updateBusinessTemplateFromUrl
    imported_bt5 = self.download(url = download_url, id = id)
  Module Products.ERP5.Tool.TemplateTool, line 382, in download
    bt = self._download_local(path, id)
  Module Products.ERP5.Tool.TemplateTool, line 328, in _download_local
    bt.importFile(path)
  Module Products.ERP5.Document.BusinessTemplate, line 5887, in importFile
    self.storeTemplateItemData()
  Module Products.ERP5.Document.BusinessTemplate, line 5165, in storeTemplateItemData
    InterfaceTemplateItem(self.getTemplateInterfaceIdList())
AttributeError: getTemplateInterfaceIdList
parent 85c80d35
...@@ -5161,10 +5161,6 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5161,10 +5161,6 @@ Business Template is a set of definitions, such as skins, portal types and categ
ModuleTemplateItem(self.getTemplateModuleIdList()) ModuleTemplateItem(self.getTemplateModuleIdList())
self._document_item = \ self._document_item = \
DocumentTemplateItem(self.getTemplateDocumentIdList()) DocumentTemplateItem(self.getTemplateDocumentIdList())
self._interface_item = \
InterfaceTemplateItem(self.getTemplateInterfaceIdList())
self._mixin_item = \
MixinTemplateItem(self.getTemplateMixinIdList())
self._property_sheet_item = \ self._property_sheet_item = \
PropertySheetTemplateItem(self.getTemplatePropertySheetIdList(), PropertySheetTemplateItem(self.getTemplatePropertySheetIdList(),
context=self) context=self)
...@@ -5246,6 +5242,10 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5246,6 +5242,10 @@ Business Template is a set of definitions, such as skins, portal types and categ
self._catalog_security_uid_column_item = \ self._catalog_security_uid_column_item = \
CatalogSecurityUidColumnTemplateItem( CatalogSecurityUidColumnTemplateItem(
self.getTemplateCatalogSecurityUidColumnList()) self.getTemplateCatalogSecurityUidColumnList())
self._interface_item = \
InterfaceTemplateItem(self.getTemplateInterfaceIdList())
self._mixin_item = \
MixinTemplateItem(self.getTemplateMixinIdList())
except AttributeError: except AttributeError:
# be backwards compatible with old zope instances which # be backwards compatible with old zope instances which
# do not contain recent version of erp5_property_sheets # do not contain recent version of erp5_property_sheets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment