diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py index 4b9d83c683fd4d1522dc5b8887921effc31fafe8..6b88e076928bb415872cddf6cdbc8d86fb2320a4 100644 --- a/product/ERP5Type/ERP5Type.py +++ b/product/ERP5Type/ERP5Type.py @@ -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',