summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/graph/graph_view.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_view.js b/addons/web/static/src/js/views/graph/graph_view.js
index c3ad22f6ced..64c65694784 100644
--- a/addons/web/static/src/js/views/graph/graph_view.js
+++ b/addons/web/static/src/js/views/graph/graph_view.js
@@ -46,6 +46,8 @@ var GraphView = AbstractView.extend({
var groupableFields = {};
this.fields.__count__ = {string: _t("Count"), type: "integer"};
+ var measureString = {};
+
this.arch.children.forEach(function (field) {
var fieldName = field.attrs.name;
if (fieldName === "id") {
@@ -61,6 +63,9 @@ var GraphView = AbstractView.extend({
} else {
groupBys.push(fieldName);
}
+ if (field.attrs.string) {
+ measureString[fieldName] = field.attrs.string;
+ }
});
_.each(this.fields, function (field, name) {
@@ -75,6 +80,12 @@ var GraphView = AbstractView.extend({
}
});
+ _.each(measureString, function (string, name) {
+ if (measures[name]) {
+ measures[name].string = string;
+ }
+ });
+
this.controllerParams.measures = measures;
this.controllerParams.groupableFields = groupableFields;
this.rendererParams.fields = this.fields;