Skip validate only on constant readonly fields

A field can be readonly by the domain inversion in the validate method. So it
should be validated again in case its domain inversion change and reset it a
non-readonly.
So only field that are always readonly can be skipped for the validation.

issue6448
review37351002
This commit is contained in:
Cédric Krier committed 2017-04-26 19:36:21 +02:00
1 parent dc051be5b1
commit 49cad65ccd
1 file changed
+1 -1
+1 -1
View File
@@ -401,7 +401,7 @@ class Record(SignalEvent):
for field_name, field in self.group.fields.iteritems():
if fields is not None and field_name not in fields:
continue
if field.get_state_attrs(self).get('readonly', False):
if field.attrs.get('readonly'):
continue
if field_name == self.group.exclude_field:
continue