changeset 6d6b1c06bfb5 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=6d6b1c06bfb5
description:
        Ask to save modified record before execute action

        issue9880
        review318921005
diffstat:

 src/tab.js |  6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diffs (16 lines):

diff -r bfd7ae278834 -r 6d6b1c06bfb5 src/tab.js
--- a/src/tab.js        Fri Dec 04 18:37:36 2020 +0100
+++ b/src/tab.js        Fri Dec 04 18:41:38 2020 +0100
@@ -640,11 +640,7 @@
                         }).text(action.name))
                         .click(function(evt) {
                             evt.preventDefault();
-                            var prm = jQuery.when();
-                            if (this.screen.modified()) {
-                                prm = this.save();
-                            }
-                            prm.then(function() {
+                            this.modified_save().then(function() {
                                 var exec_action = jQuery.extend({}, action);
                                 var record_id = null;
                                 if (screen.current_record) {

Reply via email to