Browse Source

[FIX][web_advanced_search_x2x] Load fields in user's language

Fixes #702.
pull/704/head
Jairo Llopis 7 years ago
parent
commit
f7132b139c
  1. 11
      web_widget_domain_v11/static/src/copied-js/model_field_selector.js

11
web_widget_domain_v11/static/src/copied-js/model_field_selector.js

@ -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", [
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); this.cache[model] = sortFields(fields);
}).bind(this)); }).bind(this));
return this.cacheDefs[model]; return this.cacheDefs[model];

Loading…
Cancel
Save