Commit 60ac228b authored by Julien Muchembled's avatar Julien Muchembled

meta_type of portal types is not 'ERP5 Type Information' anymore

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29275 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abd6559f
......@@ -874,7 +874,7 @@ class ObjectTemplateItem(BaseTemplateItem):
subobjects_dict = self._backupObject(action, trashbin,
container_path, object_id)
# in case of portal types, we want to keep some properties
if getattr(old_obj, 'meta_type', None) == 'ERP5 Type Information':
if getattr(old_obj, 'meta_type', None) == 'ERP5 Base Type':
for attr in ('allowed_content_type_list',
'hidden_content_type_list',
'property_sheet_list',
......
......@@ -936,8 +936,8 @@ class Base( CopyContainer,
#LOG( "Create createRelatedValueAccessors %s" % bid,0,'')
createRelatedValueAccessors(property_holder, bid)
generated_bid[bid] = 1
for ptype in portal_types.objectValues('ERP5 Type Information') :
for bid in ptype.base_category_list :
for ptype in portal_types.objectValues():
for bid in ptype.getTypeBaseCategoryList():
if bid not in generated_bid :
createRelatedValueAccessors(property_holder, bid)
generated_bid[bid] = 1
......
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