diff options
| author | Denis Ledoux <dle@odoo.com> | 2014-09-02 17:32:37 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2014-09-02 17:32:37 +0200 |
| commit | 57b48602fb7afa5d0539e8d0caa8d1e10c3910e5 (patch) | |
| tree | 1ab2dc9267f26f1114878d0739d011461f665953 /addons/web/static/src/js/views.js | |
| parent | 0bee015dd67cb809fd235215b43d331074824e42 (diff) | |
[FIX] web: chain close action on wizard confirm
If a wizard has several steps, or laucnh a second wizard, the view from where has been loaded the initial wizard is finally reloaded
Diffstat (limited to 'addons/web/static/src/js/views.js')
| -rw-r--r-- | addons/web/static/src/js/views.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 78accfd4da4..b59e86b2192 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -373,6 +373,10 @@ instance.web.ActionManager = instance.web.Widget.extend({ } var widget = executor.widget(); if (executor.action.target === 'new') { + var pre_dialog = this.dialog; + if (pre_dialog){ + pre_dialog.off('closing', null, pre_dialog.on_close); + } if (this.dialog_widget && !this.dialog_widget.isDestroyed()) { this.dialog_widget.destroy(); } @@ -380,7 +384,13 @@ instance.web.ActionManager = instance.web.Widget.extend({ this.dialog = new instance.web.Dialog(this, { dialogClass: executor.klass, }); - this.dialog.on("closing", null, options.on_close); + this.dialog.on_close = function(){ + options.on_close.apply(null, arguments); + if (pre_dialog && pre_dialog.on_close){ + pre_dialog.on_close(); + } + }; + this.dialog.on("closing", null, this.dialog.on_close); this.dialog.dialog_title = executor.action.name; if (widget instanceof instance.web.ViewManager) { _.extend(widget.flags, { |
