Commit e8ddb422 authored by Julien Muchembled's avatar Julien Muchembled

Fix upgrade of portal types

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29279 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f0e50352
......@@ -875,7 +875,7 @@ class ObjectTemplateItem(BaseTemplateItem):
container_path, object_id)
# in case of portal types, we want to keep some properties
if getattr(old_obj, 'meta_type', None) == 'ERP5 Base Type':
for attr in ('allowed_content_type_list',
for attr in ('allowed_content_types',
'hidden_content_type_list',
'property_sheet_list',
'base_category_list'):
......
......@@ -17,6 +17,10 @@
<key> <string>allow_discussion</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Action Information</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Action Information...</string> </value>
......@@ -47,10 +51,6 @@
<none/>
</value>
</item>
<item>
<key> <string>meta_type</string> </key>
<value> <string>ERP5 Action Information</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
......
......@@ -32,6 +32,10 @@
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Base Type</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Portal Type is the meta portal type information for all standard portal types in ERP5.</string> </value>
......
......@@ -9,6 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Role Information</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Role Information defines the way to generate local roles on each portal type.</string> </value>
......
......@@ -32,6 +32,10 @@
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Types Tool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>The Types Tool centralises all portal type definitions.</string> </value>
......
......@@ -230,13 +230,10 @@ class ERP5TypeInformation(XMLObject,
def __init__(self, id, **kw):
XMLObject.__init__(self, id)
# copied from CMFCore.TypesTool
if (not kw.has_key('content_meta_type')
and kw.has_key('meta_type')):
kw['content_meta_type'] = kw['meta_type']
if (not kw.has_key('content_icon')
and kw.has_key('icon')):
kw['content_icon'] = kw['icon']
if 'meta_type' in kw:
kw.setdefault('content_meta_type', kw.pop('meta_type'))
if 'icon' in kw:
kw.setdefault('content_icon', kw.pop('icon'))
self.__dict__.update(kw)
# Groups are used to classify portal types (e.g. resource).
......
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