From 851140c7f4a302e8b7f49b4e836a75b7d487c8d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 10 Dec 2014 09:49:48 +0100 Subject: [PATCH] [FIX] web: correctly init searchview when no action_id the method prepare_dropdown_menu wasn't called when the searchview did not have an action id. This can cause problems in some cases (for example, a crash in messaging when toggling the favorite menu) --- addons/web/static/src/js/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 1c6ec44..312432d 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1615,7 +1615,10 @@ instance.web.search.FavoriteMenu = instance.web.Widget.extend({ } }) .on('reset', this.proxy('clear_selection')); - if (!this.action_id) return $.when(); + if (!this.action_id) { + this.prepare_dropdown_menu([]); + return $.when(); + } return this.model.call('get_filters', [this.target_model, this.action_id]) .done(this.proxy('prepare_dropdown_menu')); }, -- 1.7.10.4