Set all fields readonly for inactive records

issue3747
review295061011
This commit is contained in:
Cédric Krier
2020-03-17 20:08:13 +01:00
parent 3cf21e7fb1
commit e28cc65cce
+2 -4
View File
@@ -14,23 +14,21 @@ class Location(metaclass=PoolMeta):
'Provisioning Location',
states={
'invisible': Eval('type') != 'storage',
'readonly': ~Eval('active'),
},
domain=[
('type', 'in', ['storage', 'view']),
],
depends=['type', 'active'],
depends=['type'],
help='Leave empty for no default provisioning.')
overflowing_location = fields.Many2One('stock.location',
'Overflowing Location',
states={
'invisible': Eval('type') != 'storage',
'readonly': ~Eval('active'),
},
domain=[
('type', 'in', ['storage', 'view']),
],
depends=['type', 'active'],
depends=['type'],
help='Leave empty for no default overflowing.')