From f7132b139cfff64e3caeeb030025e84809b43e9e Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 21 Aug 2017 14:17:27 +0200 Subject: [PATCH] [FIX][web_advanced_search_x2x] Load fields in user's language Fixes #702. --- .../static/src/copied-js/model_field_selector.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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];