diff --git a/address.py b/address.py index 873c0ea08a..3200bc1cf4 100644 --- a/address.py +++ b/address.py @@ -1,7 +1,7 @@ #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 Model, fields -from trytond.pyson import Not, Bool, Eval +from trytond.pyson import Eval import luhn @@ -9,7 +9,7 @@ class Address(Model): _name = 'party.address' siret_nic = fields.Char('SIRET NIC', select=1, states={ - 'readonly': Not(Bool(Eval('active'))), + 'readonly': ~Eval('active', True), }, size=5, depends=['active']) siret = fields.Function(fields.Char('SIRET'), 'get_siret') diff --git a/party.py b/party.py index eb2f537f90..d9a34e6dac 100644 --- a/party.py +++ b/party.py @@ -1,7 +1,7 @@ #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 Model, fields -from trytond.pyson import Not, Bool, Eval +from trytond.pyson import Eval import luhn @@ -9,7 +9,7 @@ class Party(Model): _name = 'party.party' siren = fields.Char('SIREN', select=1, states={ - 'readonly': Not(Bool(Eval('active'))), + 'readonly': ~Eval('active', True), }, size=9, depends=['active']) def __init__(self):