diff --git a/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js b/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js index 36937962..84d2ff37 100644 --- a/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js +++ b/web_advanced_search_x2x/static/src/js/web_advanced_search_x2x.js @@ -36,6 +36,10 @@ odoo.define('web_advanced_search_x2x.search_filters', function (require) { this.operators.push({ 'value': 'domain', 'text': core._lt('is in selection'), }); + // Avoid hiding filter when using special widgets + this.events["click"] = function (event) { + event.stopPropagation(); + } return this._super.apply(this, arguments); }, diff --git a/web_widget_domain_v11/static/src/copied-js/model_field_selector.js b/web_widget_domain_v11/static/src/copied-js/model_field_selector.js index d1d6702f..90571095 100644 --- a/web_widget_domain_v11/static/src/copied-js/model_field_selector.js +++ b/web_widget_domain_v11/static/src/copied-js/model_field_selector.js @@ -310,10 +310,13 @@ var fieldsCache = { }).bind(this)); }, updateCache: function (model) { - this.cacheDefs[model] = new Model(model).call("fields_get", [ - false, - ["store", "searchable", "type", "string", "relation", "selection", "related"], - ]).then((function (fields) { + var _model = new Model(model); + this.cacheDefs[model] = _model.call( + "fields_get", + [false, ["store", "searchable", "type", "string", "relation", + "selection", "related"]], + {context: _model.context()} + ).then((function (fields) { this.cache[model] = sortFields(fields); }).bind(this)); return this.cacheDefs[model];