From 62cbc5f24008f9f8498649eee617632cd66724e0 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Fri, 12 Oct 2018 08:08:40 +0000 Subject: [FIX] board: translate custom views according to current user Have a user in English, put a sale report as "favorite" (pinned to dashboard app) Change the user's language Before this commit, the pinned view was in English (because it was recorded that way) After this commit, the pinned view is in the user's language. OPW 1890664 closes odoo/odoo#27574 --- addons/web/static/tests/helpers/test_utils.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'addons/web/static/tests/helpers/test_utils.js') diff --git a/addons/web/static/tests/helpers/test_utils.js b/addons/web/static/tests/helpers/test_utils.js index fc26aa80713..3db879ce957 100644 --- a/addons/web/static/tests/helpers/test_utils.js +++ b/addons/web/static/tests/helpers/test_utils.js @@ -171,6 +171,12 @@ function createAsyncView(params) { }); } + if (params.interceptsPropagate) { + _.each(params.interceptsPropagate, function (cb, name) { + intercept(widget, name, cb, true); + }); + } + return view.getController(widget).then(function (view) { // override the view's 'destroy' so that it calls 'destroy' on the widget // instead, as the widget is the parent of the view and the mockServer. -- cgit v1.2.3