From 6cafd9efbf41897bcaf0b8ceff781b29f1357748 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 19 Feb 2018 11:40:49 +0100 Subject: [PATCH] Add depends on Button issue6919 review40811002 --- opportunity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opportunity.py b/opportunity.py index 4f31a57af4..a6b57cdfb9 100644 --- a/opportunity.py +++ b/opportunity.py @@ -189,18 +189,23 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView): ['cancelled', 'lost', 'opportunity']), 'icon': If(Eval('state').in_(['cancelled', 'lost']), 'tryton-clear', 'tryton-go-previous'), + 'depends': ['state'], }, 'opportunity': { 'invisible': ~Eval('state').in_(['lead']), + 'depends': ['state'], }, 'convert': { 'invisible': ~Eval('state').in_(['opportunity']), + 'depends': ['state'], }, 'lost': { 'invisible': ~Eval('state').in_(['lead', 'opportunity']), + 'depends': ['state'], }, 'cancel': { 'invisible': ~Eval('state').in_(['lead', 'opportunity']), + 'depends': ['state'], }, })