From 0d60cdfd689b2c9b0be7001766175def99bc526f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 6 Mar 2015 13:34:30 +0100 Subject: [PATCH] [FIX] search view: restore the `disable_custom_filters` flag effect This search view option was properly set but not observed by the search view itself. This caused all related links and smart buttons to open a list of records that was wrongly filtered, as soon as a default filter was applicable to the target action (e.g. with default filters gloablly set per model, not per action). This regression was introduced at refactoring commit d8d6311b50d0d3446cab3f3386ad672ac486bab2 --- addons/web/static/src/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index 08b478602eb..a0398c80a5b 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -436,7 +436,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea set_default_filters: function () { var self = this, default_custom_filter = this.$buttons && this.favorite_menu.get_default_filter(); - if (default_custom_filter) { + if (!self.options.disable_custom_filters && default_custom_filter) { return this.favorite_menu.toggle_filter(default_custom_filter, true); } if (!_.isEmpty(this.defaults)) {