From 9415f9046c20d94c90df0664c712cfd930d02f8d Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Sat, 11 Aug 2007 07:56:28 +0000 Subject: [PATCH] Check in a patch by jerome, otherwise uninstallations of actions simply fail. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15611 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index 13a26decdd..ff9275eb0c 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -2117,7 +2117,14 @@ class ActionTemplateItem(ObjectTemplateItem): p = context.getPortalObject() object_path = kw.get("object_path", None) if object_path is not None: - keys = [object_path] + if '/' in object_path: + # here object_path is the path of the actions, something like + # portal_type/Person/view + ti, action_id = object_path.rsplit('/', 1) + keys = ['%s | %s' % (ti, action_id)] + else: + # compatibility ? + keys = [object_path] else: keys = self._archive.keys() for id in keys: -- 2.30.9