Always ask for action

This commit is contained in:
Cédric Krier committed 2008-05-05 10:15:46 +02:00
1 parent 5fa4be7904
commit 0890dd71c0
2 files changed
+5 -3

No files matched your search

+4 -2
View File
@@ -149,7 +149,8 @@ class Action(object):
Action.exec_report(action['report_name'], datas)
@staticmethod
def exec_keyword(keyword, data=None, context=None, warning=True):
def exec_keyword(keyword, data=None, context=None, warning=True,
alwaysask=False):
from tryton.gui import Main
actions = []
if 'id' in data:
@@ -168,7 +169,8 @@ class Action(object):
keyact[action['name']] = action
from tryton.gui import Main
res = selection(_('Select your action'), keyact, Main.get_main().window)
res = selection(_('Select your action'), keyact, Main.get_main().window,
alwaysask=alwaysask)
if res:
(name, action) = res
Action._exec_action(action, data, context=context)
+1 -1
View File
@@ -339,7 +339,7 @@ class Form(SignalEvent):
'id': obj_id or False,
'ids': ids,
'window': self.window,
}, context=ctx)
}, context=ctx, alwaysask=True)
if res:
self.previous_action = res
self.sig_reload(test_modified=False)