summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-01-25 13:24:16 +0100
committerNicolas Martinelli <nim@odoo.com>2016-01-25 17:55:43 +0100
commitb22a22f81180e1515d295aa4d7c8bf176c653ef2 (patch)
treeae9b7a7b3b25085e5926c301352dac248ab0b44d /addons/web/static/src/js
parentf46298bfe0bc14421c7253662fba4558d57870b1 (diff)
[FIX] web: translation in pivot view
The definition of "total" as a global variable is done too soon in the JS. Depending on the order in which the JS modules are loaded, it is very unlikely that the translations are already loaded at that moment. opw-666577
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views/pivot_view.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js
index f2238fcccb9..7c74103f211 100644
--- a/addons/web/static/src/js/views/pivot_view.js
+++ b/addons/web/static/src/js/views/pivot_view.js
@@ -17,7 +17,6 @@ var View = require('web.View');
var _lt = core._lt;
var _t = core._t;
var QWeb = core.qweb;
-var total = _t("Total");
var PivotView = View.extend({
template: 'PivotView',
@@ -509,6 +508,7 @@ var PivotView = View.extend({
return name + (numbers[id] > 1 ? " (" + numbers[id] + ")" : "");
},
make_header: function (data_pt, root, i, j, parent_header) {
+ var total = _t("Total");
var attrs = data_pt.attributes,
value = attrs.value,
title = value.length ? value[value.length - 1] : total;
@@ -537,6 +537,7 @@ var PivotView = View.extend({
},
get_header: function (data_pt, root, i, j, parent) {
var path;
+ var total = _t("Total");
if (parent) {
path = parent.path.concat(data_pt.attributes.value.slice(i,j));
} else {