[MERGE] forward port of branch saas-5 up to e4cb520
[odoo/odoo.git] / addons / web / static / src / js / chrome.js
index ef3aedb..b0e22f9 100644 (file)
@@ -185,12 +185,12 @@ instance.web.Dialog = instance.web.Widget.extend({
     close: function(reason) {
         if (this.dialog_inited && !this.__tmp_dialog_hiding) {
             $('.tooltip').remove(); //remove open tooltip if any to prevent them staying when modal has disappeared
-            this.trigger("closing", reason);
             if (this.$el.is(":data(bs.modal)")) {     // may have been destroyed by closing signal
                 this.__tmp_dialog_hiding = true;
                 this.$dialog_box.modal('hide');
                 this.__tmp_dialog_hiding = undefined;
             }
+            this.trigger("closing", reason);
         }
     },
     _closing: function() {