From dd88bc85301ac1869ae7a5e8706fc2b59c7fbdc3 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 19 Feb 2018 11:38:52 +0100 Subject: [PATCH] Add depends on Button issue6919 review40811002 --- production.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/production.py b/production.py index 49fb95c476..5585114d15 100644 --- a/production.py +++ b/production.py @@ -178,6 +178,7 @@ class Production(Workflow, ModelSQL, ModelView): 'cancel': { 'invisible': ~Eval('state').in_(['request', 'draft', 'assigned']), + 'depends': ['state'], }, 'draft': { 'invisible': ~Eval('state').in_(['request', 'waiting', @@ -187,10 +188,12 @@ class Production(Workflow, ModelSQL, ModelView): If(Eval('state') == 'request', 'tryton-go-next', 'tryton-go-previous')), + 'depends': ['state'], }, 'reset_bom': { 'invisible': (~Eval('bom') | ~Eval('state').in_(['request', 'draft', 'waiting'])), + 'depends': ['state', 'bom'], }, 'wait': { 'invisible': ~Eval('state').in_(['draft', 'assigned', @@ -200,15 +203,19 @@ class Production(Workflow, ModelSQL, ModelView): If(Eval('state') == 'waiting', 'tryton-clear', 'tryton-go-next')), + 'depends': ['state'], }, 'run': { 'invisible': Eval('state') != 'assigned', + 'depends': ['state'], }, 'done': { 'invisible': Eval('state') != 'running', + 'depends': ['state'], }, 'assign_wizard': { 'invisible': Eval('state') != 'waiting', + 'depends': ['state'], }, 'assign_try': {}, 'assign_force': {},