summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/search.js
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2015-03-06 13:34:30 +0100
committerOlivier Dony <odo@openerp.com>2015-03-06 13:34:32 +0100
commit0d60cdfd689b2c9b0be7001766175def99bc526f (patch)
treef6c2c1dec9ef9a981e8969d7dec0616549a214ad /addons/web/static/src/js/search.js
parenta6919adf704d2e5ef4b629ed5685efe11bfeca82 (diff)
[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
Diffstat (limited to 'addons/web/static/src/js/search.js')
-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 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)) {