Commit 9fd4bc75 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

now we need to find action information object by matching 'reference' instead...

now we need to find action information object by matching 'reference' instead of 'id'. with this fix, action can be successfully removed. and if action if missing, we output log just same as portal type itself is missing.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30158 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6452a3b2
......@@ -2551,7 +2551,7 @@ class ActionTemplateItem(ObjectTemplateItem):
for id in keys:
if '|' in id:
relative_url, value = id.split(' | ')
key = 'id'
key = 'reference'
else:
relative_url, key, value = self._splitPath(id)
obj = p.unrestrictedTraverse(relative_url, None)
......@@ -2561,9 +2561,8 @@ class ActionTemplateItem(ObjectTemplateItem):
if getattr(action_list[index], key) == value:
obj.deleteActions(selections=(index,))
break
else :
LOG('BusinessTemplate', 100,
'unable to uninstall action at %s, ignoring' % relative_url )
LOG('BusinessTemplate', 100,
'unable to uninstall action at %s, ignoring' % relative_url )
BaseTemplateItem.uninstall(self, context, **kw)
class PortalTypeRolesTemplateItem(BaseTemplateItem):
......
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