diff options
| author | Denis Ledoux <dle@odoo.com> | 2016-07-04 18:36:27 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2016-07-04 18:40:15 +0200 |
| commit | 6c85d925c310fbbcd5b5f374932440b2e6482e37 (patch) | |
| tree | 2c6580f508b7e6ddf965c3ae8da3113397d074d5 /addons/web/static/src/js/framework | |
| parent | faf357789637d426fc42514fbd789223b26471d2 (diff) | |
[FIX] web: dialog close with a reason
In the below revision:
c0db6aec56d383d173fa56b1a2dec2e42495911b
The dialog close `reason` was introduced
to not reload the current form if the dialog
has been closed for a reason
(e.g. a window action was returned by the server).
This is to prevent the record reload, which:
- Is useless, as another action has been launched
and the user therefore redirected elsewhere
- Can fail, in the case the initial action deleted
the current record
(e.g. when merging a lead in an opportunity, the
lead is removed, and therefore this is not possible to reload
it).
opw-680180
Diffstat (limited to 'addons/web/static/src/js/framework')
| -rw-r--r-- | addons/web/static/src/js/framework/dialog.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/framework/dialog.js b/addons/web/static/src/js/framework/dialog.js index cd4540af270..b39cae3c3a5 100644 --- a/addons/web/static/src/js/framework/dialog.js +++ b/addons/web/static/src/js/framework/dialog.js @@ -124,11 +124,11 @@ var Dialog = Widget.extend({ this.$modal.modal('hide'); }, - destroy: function() { + destroy: function(reason) { if(this.isDestroyed()) return; - this.trigger("closed"); + this.trigger("closed", reason); this._super(); |
