From 0e00e6da7f8a5e7ecc4fe2dbd248bd699e3493a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 18 Apr 2011 11:23:40 +0200 Subject: [PATCH] Don't validate static readonly field for issue1962 --- tryton/gui/window/view_form/model/field.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tryton/gui/window/view_form/model/field.py b/tryton/gui/window/view_form/model/field.py index a5b9ec5f06..381374ad53 100644 --- a/tryton/gui/window/view_form/model/field.py +++ b/tryton/gui/window/view_form/model/field.py @@ -73,6 +73,8 @@ class CharField(object): return context def validate(self, record, softvalidation=False): + if self.attrs.get('readonly'): + return True res = True self.get_state_attrs(record)['domain_readonly'] = False inverted_domain, domain = self.validation_domains(record) @@ -670,6 +672,8 @@ class O2MField(CharField): return screen_domain, screen_domain def validate(self, record, softvalidation=False): + if self.attrs.get('readonly'): + return True res = True for record2 in record.value.get(self.name, []): if not record2.loaded: