diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 03ba846c157984236ce07d71aaaef9b96eb00d27..bd4d9ee2f8cabf39384698ab3814cf6c0ff22720 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -663,8 +663,8 @@ class ObjectTemplateItem(BaseTemplateItem): obj = obj._getCopy(container) container._setObject(object_id, obj) obj = container._getOb(object_id) - # mark a business template installation so in 'PortalType_afterClone' scripts - # we can implement logical for reseting or not attributes (i.e reference). + # mark a business template installation so in 'PortalType_afterClone' scripts + # we can implement logical for reseting or not attributes (i.e reference). self.REQUEST.set('is_business_template_installation', 1) obj.manage_afterClone(obj) obj.wl_clearLocks() @@ -1887,10 +1887,12 @@ class CatalogMethodTemplateItem(ObjectTemplateItem): else: values = self._archive.values() else: - value = self._archive[object_path] + try: + value = self._archive[object_path] + except KeyError: + value = None if value is not None: values.append(value) - for obj in values: method_id = obj.id # remove method references in portal_catalog