diff --git a/product/ERP5Type/DocumentationHelper/DocumentationHelper.py b/product/ERP5Type/DocumentationHelper/DocumentationHelper.py index 932b46f7f1ce80499a52f9a1132fcfcc633700d0..0b0215baca84ffde0c29057f5fcdfa17acebb0ca 100644 --- a/product/ERP5Type/DocumentationHelper/DocumentationHelper.py +++ b/product/ERP5Type/DocumentationHelper/DocumentationHelper.py @@ -66,7 +66,7 @@ class TempObjectLibrary(object): container = self(random.choice(possible_parent_list)) else: container = self.root - temp_object = container.newContent(portal_type=portal_type, temp_object=1, id=portal_type) + temp_object = container.newContent(portal_type=portal_type, temp_object=1) self.portal_type_dict[portal_type] = temp_object return temp_object diff --git a/product/ERP5Type/DocumentationHelper/PortalTypeInstanceDocumentationHelper.py b/product/ERP5Type/DocumentationHelper/PortalTypeInstanceDocumentationHelper.py index d8e0b29b6d5e10d28d49807b4b95766ab91809f4..bdc570242e15399f5ee96cf2b61643f10d4f0a19 100644 --- a/product/ERP5Type/DocumentationHelper/PortalTypeInstanceDocumentationHelper.py +++ b/product/ERP5Type/DocumentationHelper/PortalTypeInstanceDocumentationHelper.py @@ -98,7 +98,12 @@ class PortalTypeInstanceDocumentationHelper(DocumentationHelper): def _getPropertyHolder(self): from Products.ERP5Type.Base import Base - return Base.aq_portal_type[(self.getPortalType(), self.getInstance().__class__)] + property_holder = None + key = (self.getPortalType(), self.getInstance().__class__) + if not(Base.aq_portal_type.has_key(key)): + self.getInstance().initializePortalTypeDynamicProperties() + property_holder = Base.aq_portal_type[(self.getPortalType(), self.getInstance().__class__)] + return property_holder security.declareProtected( Permissions.AccessContentsInformation, 'getAccessorMethodItemList' ) def getAccessorMethodItemList(self):