[FIX] web: correctly init searchview when no action_id
[odoo/odoo.git] / addons / web / static / src / js / search.js
index 1c6ec44..312432d 100644 (file)
@@ -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'));
     },