From bd708e112b6e20365097985ec790d8db207c4021 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 --- production.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/production.py b/production.py index bd88fd6ac3..acd7a354e4 100644 --- a/production.py +++ b/production.py @@ -492,6 +492,12 @@ class Production(Workflow, ModelSQL, ModelView): costs=self.cost, outputs=cost_price)) + @classmethod + def view_attributes(cls): + return [ + ('/tree', 'visual', If(Eval('state') == 'cancel', 'muted', '')), + ] + @classmethod def create(cls, vlist): Sequence = Pool().get('ir.sequence')