[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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user