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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 30 16:03:02 CET 2009


Author: kazuhiko
Date: Fri Oct 30 16:03:00 2009
New Revision: 30158

URL: http://svn.erp5.org?rev=30158&view=rev
Log:
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.

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=30158&r1=30157&r2=30158&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Fri Oct 30 16:03:00 2009
@@ -2551,7 +2551,7 @@
     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 @@
           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):




More information about the Erp5-report mailing list