Set all fields readonly for inactive records

issue3747
review295061011
This commit is contained in:
Cédric Krier
2020-03-17 20:08:12 +01:00
parent febbdf200d
commit 267156ed95
+1 -6
View File
@@ -3,7 +3,6 @@
from trytond.model import (ModelStorage, ModelView, DeactivableMixin, fields,
tree)
from trytond.pool import PoolMeta, Pool
from trytond.pyson import Eval
class ClassificationMixin(DeactivableMixin):
@@ -34,11 +33,7 @@ class Template(metaclass=PoolMeta):
selection='get_classification',
domain=[
('selectable', '=', True),
],
states={
'readonly': ~Eval('active', True),
},
depends=['active'])
])
@classmethod
def _get_classification(cls):