Commit 89d8a0e3 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

modify r30158 change because several tools still use CMF actions:

> 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@30164 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9f142c06
......@@ -2551,7 +2551,11 @@ class ActionTemplateItem(ObjectTemplateItem):
for id in keys:
if '|' in id:
relative_url, value = id.split(' | ')
key = 'reference'
obj = p.unrestrictedTraverse(relative_url, None)
# Several tools still use CMF actions
if obj is not None:
is_new_action = obj.getParentId() == 'portal_types'
key = is_new_action and 'reference' or 'id'
else:
relative_url, key, value = self._splitPath(id)
obj = p.unrestrictedTraverse(relative_url, None)
......
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