From 1cc55105f254baf05c6b14b2805dc9b14be77cbf Mon Sep 17 00:00:00 2001
From: Leonardo Rochael Almeida <leonardo@nexedi.com>
Date: Wed, 21 Oct 2009 14:20:10 +0000
Subject: [PATCH] Test our API before the CMFCore API when listing actions so
 our tools queried with our API instead of CMFCore's (approved by jm)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29880 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/ActionsTool.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/patches/ActionsTool.py b/product/ERP5Type/patches/ActionsTool.py
index a8e28176ce..679e266f9a 100644
--- a/product/ERP5Type/patches/ActionsTool.py
+++ b/product/ERP5Type/patches/ActionsTool.py
@@ -34,14 +34,14 @@ def listFilteredActionsFor(self, object=None):
     # Include actions from specific tools.
     for provider_name in self.listActionProviders():
         provider = getattr(self, provider_name)
-        if IActionProvider_providedBy(provider):
-            actions.extend( provider.listActionInfos(object=object) )
-        elif hasattr(provider, 'getActionListFor'):
+        if hasattr(provider, 'getActionListFor'):
             from Products.ERP5Type.Utils import createExpressionContext
             ec = createExpressionContext(object)
             actions.extend(action.cook(ec)
                            for action in provider.getActionListFor(object)
                            if action.test(ec))
+        elif IActionProvider_providedBy(provider):
+            actions.extend( provider.listActionInfos(object=object) )
         else:
             # for Action Providers written for CMF versions before 1.5
             actions.extend( self._listActionInfos(provider, object) )
-- 
2.30.9