From 88e1e01b9087fb6aa2c661bf55e72b4ce59b3b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 May 2019 13:37:21 +0200 Subject: [PATCH] Do not send value for readonly Many2Many In contrary to One2Many, Many2Many can not be modified when they are readonly. But Many2Many inherit from One2Many so we must exclude them explicitly from the test. issue8323 review275371002 --- tryton/gui/window/view_form/model/record.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index b3ffc333c3..ef5c82f857 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -254,7 +254,8 @@ class Record(SignalEvent): value = {} for name, field in self.group.fields.items(): if (field.attrs.get('readonly') - and not isinstance(field, fields.O2MField)): + and not (isinstance(field, fields.O2MField) + and not isinstance(field, fields.M2MField))): continue if field.name not in self.modified_fields and self.id >= 0: continue