Commit 5c655a44 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Migrate ActionInformation to Portal Type classes, but *only* on bt

installation for now. This commit fixes AttributeError in
testBusinessTemplate.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43220 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39551355
......@@ -2877,8 +2877,15 @@ class ActionTemplateItem(ObjectTemplateItem):
container.manage_delObjects([obj.id
for obj in container.getActionInformationList()
if obj.getReference() in action_dict])
for obj in action_dict.itervalues():
container._importOldAction(obj)
for name, obj in action_dict.iteritems():
imported_action = container._importOldAction(obj).aq_base
# if that's an old style class, use a portal type class instead
# XXX PortalTypeTemplateItem-specific
migrateme = getattr(imported_action, '_migrateToPortalTypeClass', None)
if migrateme is not None:
migrateme()
else:
BaseTemplateItem.install(self, context, trashbin, **kw)
p = context.getPortalObject()
......
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