Add depends on Button

issue6919
review40811002
This commit is contained in:
Sergi Almacellas Abellana committed 2018-02-19 11:39:16 +01:00
1 parent b4f7ca9e25
commit 77472844cd
1 file changed
+3
+3
View File
@@ -290,12 +290,15 @@ class WorkCycle(Workflow, ModelSQL, ModelView):
cls._buttons.update({
'cancel': {
'invisible': Eval('state').in_(['done', 'cancelled']),
'depends': ['state'],
},
'run': {
'invisible': Eval('state') != 'draft',
'depends': ['state'],
},
'do': {
'invisible': Eval('state') != 'running',
'depends': ['state'],
},
})