diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-06-28 19:01:52 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-06-28 19:01:52 +0200 |
| commit | c8bb02141d2801c243ae65ba6800b07f090bb5c6 (patch) | |
| tree | 2d099c5577df4783a6db3d853cf0141bf41c1aa9 /addons/web/static/src/js/chrome | |
| parent | 4e2733e83a1f42773fb28f66431a0d6fb0393be9 (diff) | |
| parent | 3cdcbce93cbde548d2d24426ee8de1d93f06706e (diff) | |
[MERGE] forward port branch saas-11.3 up to 3cdcbce93cb
Diffstat (limited to 'addons/web/static/src/js/chrome')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index 0fe45f011e8..f98447c8983 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -391,10 +391,13 @@ var ActionManager = Widget.extend({ } return this._startController(controller).then(function (controller) { + var prevDialogOnClose; if (self.currentDialogController) { + prevDialogOnClose = self.currentDialogController.onClose; self._closeDialog(true); } + controller.onClose = prevDialogOnClose || options.on_close; var dialog = new Dialog(self, _.defaults({}, options, { buttons: [], dialogClass: controller.className, @@ -405,7 +408,7 @@ var ActionManager = Widget.extend({ self._removeAction(action.jsID); self.currentDialogController = null; if (silent !== true) { - options.on_close(); + controller.onClose(); } }); controller.dialog = dialog; @@ -488,8 +491,9 @@ var ActionManager = Widget.extend({ * @returns {Deferred} resolved immediately */ _executeCloseAction: function (action, options) { + var result; if (!this.currentDialogController) { - options.on_close(); + result = options.on_close(); } this._closeDialog(); @@ -499,7 +503,7 @@ var ActionManager = Widget.extend({ this.trigger_up('show_effect', action.effect); } - return $.when(); + return $.when(result); }, /** * Executes actions of type 'ir.actions.server'. |
