changeset fe76b9b69f5a in modules/stock_location_sequence:default
details: 
https://hg.tryton.org/modules/stock_location_sequence?cmd=changeset;node=fe76b9b69f5a
description:
        Set all fields readonly for inactive records

        issue3747
        review295061011
diffstat:

 stock.py |  8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diffs (20 lines):

diff -r cd752fdd2200 -r fe76b9b69f5a stock.py
--- a/stock.py  Sun Mar 01 16:12:40 2020 +0100
+++ b/stock.py  Tue Mar 17 20:08:12 2020 +0100
@@ -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']

Reply via email to