3
0
Fork 0

Merge pull request #704 from Tecnativa/10.0-web_advanced_search_x2x-fix_ui

[FIX][web_advanced_search_x2x] UI failures
10.0
Pedro M. Baeza 2017-08-21 16:14:30 +02:00 committed by GitHub
commit 3466323704
2 changed files with 11 additions and 4 deletions

View File

@ -36,6 +36,10 @@ odoo.define('web_advanced_search_x2x.search_filters', function (require) {
this.operators.push({ this.operators.push({
'value': 'domain', 'text': core._lt('is in selection'), '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); return this._super.apply(this, arguments);
}, },

View File

@ -310,10 +310,13 @@ var fieldsCache = {
}).bind(this)); }).bind(this));
}, },
updateCache: function (model) { updateCache: function (model) {
this.cacheDefs[model] = new Model(model).call("fields_get", [ var _model = new Model(model);
false, this.cacheDefs[model] = _model.call(
["store", "searchable", "type", "string", "relation", "selection", "related"], "fields_get",
]).then((function (fields) { [false, ["store", "searchable", "type", "string", "relation",
"selection", "related"]],
{context: _model.context()}
).then((function (fields) {
this.cache[model] = sortFields(fields); this.cache[model] = sortFields(fields);
}).bind(this)); }).bind(this));
return this.cacheDefs[model]; return this.cacheDefs[model];