[Erp5-report] r15611 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Aug 11 09:56:28 CEST 2007


Author: yo
Date: Sat Aug 11 09:56:28 2007
New Revision: 15611

URL: http://svn.erp5.org?rev=15611&view=rev
Log:
Check in a patch by jerome, otherwise uninstallations of actions simply fail.

Modified:
    erp5/trunk/products/ERP5/Document/BusinessTemplate.py

Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=15611&r1=15610&r2=15611&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Sat Aug 11 09:56:28 2007
@@ -2117,7 +2117,14 @@
     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:




More information about the Erp5-report mailing list