From 9f9e7ef0e1ca1d2f5fc5e0a166499c95359dbbf3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 9 Dec 2014 12:40:32 +0100 Subject: [PATCH] [FIX] web: user lang has the priority on partner lang Potentialy, the timezone too. On item action click (such as menus in More.. and Print..), the data in form view had the priority on user context (through the sidebar_eval_context) Therefore, if a field "lang" was present in the form view (like in partner form), the web/action/load xmlrpc call was using the partner language instead of the user language. Example of wrong use case before the fix: - Set the user language in French, then go to a partner form of a partner with English set as language - Click on any button of the partner form, such as the "Invoices" button, notice that the last item of the breadcrumb is in English, instead of Frenh (the user language) - Click on any menu opening a wizard in the More.. dropdown menu, notice that the wizard title is in English instead of French - Print any report from the Print dropdown menu, notice that the report file name is in English. If you print the same report for the same partner but from the list view, the report file name is in French. --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index ed246e58da6..aceb3e665fd 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1165,7 +1165,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM }, build_eval_context: function() { var a_dataset = this.dataset; - return new instance.web.CompoundContext(a_dataset.get_context(), this._build_view_fields_values()); + return new instance.web.CompoundContext(this._build_view_fields_values(), a_dataset.get_context()); }, });