details:   https://code.tryton.org/tryton/commit/5e5a7a777901
branch:    default
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
diffstat:

 sao/src/screen.js |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (22 lines):

diff -r a125c0f1fe90 -r 5e5a7a777901 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
@@ -2077,14 +2077,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());

Reply via email to