From 1cb2174141d9970a40999e33256fbbd30ca4605e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 21 Apr 2024 15:23:18 +0200 Subject: [PATCH] Trigger record saved after reload ids when execute button The buttons of the toolbar must be updated after having saved the current record. Closes #13125 --- sao/src/screen.js | 6 ++++-- tryton/tryton/gui/window/view_form/screen/screen.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sao/src/screen.js b/sao/src/screen.js index 954a60dcd4..d973285b96 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -1964,10 +1964,12 @@ id: this.current_record.id, ids: ids }, null, this.context, true).always(() => { - return this.reload(ids, true); + return this.reload(ids, true) + .always(() => this.record_saved()); }); } else { - return this.reload(ids, true); + return this.reload(ids, true) + .always(() => this.record_saved()); } }; diff --git a/tryton/tryton/gui/window/view_form/screen/screen.py b/tryton/tryton/gui/window/view_form/screen/screen.py index a7680acce7..cbbe65fd1b 100644 --- a/tryton/tryton/gui/window/view_form/screen/screen.py +++ b/tryton/tryton/gui/window/view_form/screen/screen.py @@ -1266,6 +1266,7 @@ class Screen: except RPCException: action = None self.reload(ids, written=True) + self.record_saved() if isinstance(action, str): self.client_action(action) elif action: