[Erp5-report] r38897 seb - /erp5/trunk/products/ERP5Type/ERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 5 16:13:02 CEST 2010


Author: seb
Date: Tue Oct  5 16:13:01 2010
New Revision: 38897

URL: http://svn.erp5.org?rev=38897&view=rev
Log:
fixed regression introduced by 38891

Modified:
    erp5/trunk/products/ERP5Type/ERP5Type.py

Modified: erp5/trunk/products/ERP5Type/ERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ERP5Type.py?rev=38897&r1=38896&r2=38897&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] Tue Oct  5 16:13:01 2010
@@ -541,6 +541,12 @@ class ERP5TypeInformation(XMLObject,
 
     def _getActionList(self):
       action_list = self.getCacheableActionList()
+      # This sort is a duplicate of calculation with what is done
+      # on portal_actions.listFilteredActionsFor . But getDefaultViewFor
+      # needs the sort here. This needs to be reviewed, because it is possible
+      # to define in portal_actions some actions that will have higher
+      # priorities than actions defined on portal types
+      action_list.sort(key=lambda x:x['priority'])
       return action_list
     _getActionList = CachingMethod(_getActionList,
       id='getActionList',




More information about the Erp5-report mailing list