From d25d05bb4b96d8edec0844b1622b5271f41ea6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 6 Jan 2025 18:22:29 +0100 Subject: [PATCH] Propagate record modified to parent screens It is needed to reach the top window and update the button sensitivity. Closes #13798 --- sao/src/screen.js | 5 +++++ tryton/tryton/gui/window/view_form/screen/screen.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/sao/src/screen.js b/sao/src/screen.js index 3ed1ca1bc2..8b1554522a 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -1250,6 +1250,11 @@ window_.record_modified(); } } + if (this.group.parent) { + for (let screen of this.group.parent.group.screens) { + screen.record_modified(display); + } + } if (display) { return this.display(); } diff --git a/tryton/tryton/gui/window/view_form/screen/screen.py b/tryton/tryton/gui/window/view_form/screen/screen.py index a03bfde2eb..ed4e126717 100644 --- a/tryton/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/tryton/gui/window/view_form/screen/screen.py @@ -446,6 +446,9 @@ class Screen: for window in self.windows: if hasattr(window, 'record_modified'): window.record_modified() + if self.parent: + for screen in self.parent.group.screens: + screen.record_modified(display=display) if display: self.display()