details: https://code.tryton.org/tryton/commit/cb0e01422e78
branch: 8.0
user: Cédric Krier <[email protected]>
date: Fri Oct 16 18:16:05 2026 +0200
description:
Do not wait the completion of action of a button to reload the screen
d39be8eb5d83 add the wait of the completion of the action triggers a
double
reload of the screen that may create inconsistency for the record as
the more
button of a xxx2Many list may load new records when the second reload
has
cancelled the parent record.
It is simpler to expect that the possible action wizard will be
displayed
before the screen reload which will reactive the button.
In the worse case, a double execution may be possible but extremely
rare which
is better than an inconsistency of the record.
Closes #15179
(grafted from 5e5a7a777901f251658299b784ef9d26a420cf54)
diffstat:
sao/src/screen.js | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (22 lines):
diff -r f945ebae97c6 -r cb0e01422e78 sao/src/screen.js
--- a/sao/src/screen.js Fri Oct 16 18:05:53 2026 +0200
+++ b/sao/src/screen.js Fri Oct 16 18:16:05 2026 +0200
@@ -2052,14 +2052,13 @@
});
}
else if (action) {
- return Sao.Action.execute(action, {
+ Sao.Action.execute(action, {
model: this.model_name,
id: this.current_record.id,
ids: ids
- }, null, this.context, true).always(() => {
- return this.reload(ids, true)
- .always(() => this.record_saved());
- });
+ }, null, this.context, true);
+ return this.reload(ids, true)
+ .always(() => this.record_saved());
} else {
return this.reload(ids, true)
.always(() => this.record_saved());