From a3a06d0f966ea776708a5208f84ab8d993c124c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 17 Mar 2020 20:08:12 +0100 Subject: [PATCH] Set all fields readonly for inactive records issue3747 review295061011 --- stock.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/stock.py b/stock.py index ff91b2bf4f..08184678da 100644 --- a/stock.py +++ b/stock.py @@ -1,16 +1,8 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from trytond.model import sequence_ordered -from trytond.pyson import Eval, Bool from trytond.pool import PoolMeta class Location(sequence_ordered(), metaclass=PoolMeta): __name__ = 'stock.location' - - @classmethod - def __setup__(cls): - super(Location, cls).__setup__() - previous_readonly = cls.sequence.states.get('readonly', Bool(False)) - cls.sequence.states['readonly'] = previous_readonly | ~Eval('active') - cls.sequence.depends = ['active']