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 {