From 5200014ea9b50c4587427e89086c0807741de8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 20 Sep 2019 11:47:15 +0200 Subject: [PATCH] Add visual context on tree view issue8562 review261951002 --- opportunity.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opportunity.py b/opportunity.py index 5f72ab2ae4..3ed556cf10 100644 --- a/opportunity.py +++ b/opportunity.py @@ -226,6 +226,12 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView): if len(payment_terms) == 1: return payment_terms[0].id + @classmethod + def view_attributes(cls): + return [ + ('/tree', 'visual', If(Eval('state') == 'cancelled', 'muted', '')), + ] + @classmethod def create(cls, vlist): pool = Pool()