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): ...@@ -2551,7 +2551,7 @@ class ActionTemplateItem(ObjectTemplateItem):
for id in keys: for id in keys:
if '|' in id: if '|' in id:
relative_url, value = id.split(' | ') relative_url, value = id.split(' | ')
key = 'id' key = 'reference'
else: else:
relative_url, key, value = self._splitPath(id) relative_url, key, value = self._splitPath(id)
obj = p.unrestrictedTraverse(relative_url, None) obj = p.unrestrictedTraverse(relative_url, None)
...@@ -2561,9 +2561,8 @@ class ActionTemplateItem(ObjectTemplateItem): ...@@ -2561,9 +2561,8 @@ class ActionTemplateItem(ObjectTemplateItem):
if getattr(action_list[index], key) == value: if getattr(action_list[index], key) == value:
obj.deleteActions(selections=(index,)) obj.deleteActions(selections=(index,))
break break
else : LOG('BusinessTemplate', 100,
LOG('BusinessTemplate', 100, 'unable to uninstall action at %s, ignoring' % relative_url )
'unable to uninstall action at %s, ignoring' % relative_url )
BaseTemplateItem.uninstall(self, context, **kw) BaseTemplateItem.uninstall(self, context, **kw)
class PortalTypeRolesTemplateItem(BaseTemplateItem): 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