From 86bbfb2af6bff25d87599b489328575d9e7fa4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 6 Aug 2022 10:35:11 +0200 Subject: [PATCH] Iterate over copy of fields items in record validate The validation of the fields may trigger to fetch the definition of new fields. issue11612 review417601003 (grafted from fd0f35037e459393853314fff8702f4656baf931) --HG-- branch : 6.0 --- tryton/gui/window/view_form/model/record.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index 128c8b9b98..dbb6865a57 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -391,7 +391,7 @@ class Record(SignalEvent): elif fields is None: self._check_load() res = True - for field_name, field in self.group.fields.items(): + for field_name, field in list(self.group.fields.items()): if fields is not None and field_name not in fields: continue if field.attrs.get('readonly'):