summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-02-11 12:15:51 +0100
committerGéry Debongnie <ged@odoo.com>2015-02-11 12:17:01 +0100
commit8d34ada28234cc5e87aee72e268087e1bb09cad8 (patch)
treec3083c46fea88344f3d1a94fd32fb6ada4b22c8d /addons/web/static/src
parent8e0e2c0e4775e03d55e05f173a25157cb736f61a (diff)
[FIX] web: prevent crash after searchview is destroyed
The method view_loaded could be called after the searchview was destroyed, which is not really a good idea. As a side effect, this fixes a crash when a form view with a one2many switch to edit view, then discards the changes.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 04eebc2c0a1..4d47dc4d788 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -410,7 +410,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
this.$('.oe_searchview_unfold_drawer')
.toggleClass('fa-caret-down', !this.visible_filters)
.toggleClass('fa-caret-up', this.visible_filters);
- return this.alive($.when(this._super(), load_view.then(this.view_loaded.bind(this))));
+ return this.alive($.when(this._super(), this.alive(load_view).then(this.view_loaded.bind(this))));
},
view_loaded: function (r) {
var self = this;