Test our API before the CMFCore API when listing actions so our tools queried...

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
parent 3ab88371
......@@ -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) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment