From 3a80b3b3349f324aa580cdcd7c14a34efb9f4956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 16 Apr 2026 22:48:34 +0200 Subject: [PATCH] Only set the value on the current view of One2Many when the form set values If the current view is a form view, we need to ensure that the values are actually set for all the widgets. (grafted from c91abeb5bcc1bcb4d8c7c96b610fb142637661aa) --HG-- branch : 7.0 --- sao/src/view/form.js | 4 +--- tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sao/src/view/form.js b/sao/src/view/form.js index d3aa4b79bc..8483baba01 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -3756,9 +3756,7 @@ function eval_pyson(value){ return prm; }, set_value: function() { - if (this.screen.modified()) { // TODO check if required - this.view.screen.record_modified(false); - } + this.screen.current_view.set_value(); }, _update_completion: function(text) { if (!this.record) { diff --git a/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py b/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py index 90cc246041..82553bcb90 100644 --- a/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py +++ b/tryton/tryton/gui/window/view_form/view/form_gtk/one2many.py @@ -558,8 +558,6 @@ class One2Many(Widget): def set_value(self): self.screen.current_view.set_value() - if self.screen.modified(): # TODO check if required - self.view.screen.record_modified(display=False) return True def _completion_match_selected(self, completion, model, iter_):