From a973cdd9f8d3c7581ebbb9b1c8d1f23f29c04491 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. --- 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 784d440087..a6ca70a50a 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -3967,9 +3967,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 11171bf7e5..9d40a4a6c5 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 @@ -584,8 +584,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_):