Commit ea5ae420 authored by Jérome Perrin's avatar Jérome Perrin

Make sure action have getPriority attribute before calling it (eg. global actions do not have)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5121 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0914b6a0
...@@ -36,7 +36,8 @@ def ActionProviderBase_manage_editActionsForm( self, REQUEST, manage_tabs_messag ...@@ -36,7 +36,8 @@ def ActionProviderBase_manage_editActionsForm( self, REQUEST, manage_tabs_messag
a1['visible'] = a.getVisibility() a1['visible'] = a.getVisibility()
a1['action'] = a.getActionExpression() a1['action'] = a.getActionExpression()
a1['condition'] = a.getCondition() a1['condition'] = a.getCondition()
a1['priority'] = a.getPriority() if hasattr(a, 'getPriority') :
a1['priority'] = a.getPriority()
if hasattr(a, 'getIconExpression') : if hasattr(a, 'getIconExpression') :
a1['icon'] = a.getIconExpression() a1['icon'] = a.getIconExpression()
if hasattr(a, 'getOption') : if hasattr(a, 'getOption') :
...@@ -147,7 +148,7 @@ def ActionProviderBase_extractAction( self, properties, index ): ...@@ -147,7 +148,7 @@ def ActionProviderBase_extractAction( self, properties, index ):
permissions = ( permissions, ) permissions = ( permissions, )
if type( priority ) is not type(1.0): if type( priority ) is not type(1.0):
priority = float(priority) priority = float(priority)
return ActionInformation( id=id return ActionInformation( id=id
, title=name , title=name
......
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