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