summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph/graph_model.js
diff options
context:
space:
mode:
authorjerome hanke (jhk) <jhk@odoo.com>2020-03-17 10:49:00 +0000
committerjerome hanke (jhk) <jhk@odoo.com>2020-03-18 17:22:59 +0000
commite58db3ff5c787d087e5e8a4215a5d0a0c4becca0 (patch)
treeb55d3a0a4dd152256ef5573f3c74e1496c7c0f0f /addons/web/static/src/js/views/graph/graph_model.js
parent20e713bb2710a770a234dca1c5703699fcba8471 (diff)
[FIX] web: graph view ignores duplicate labels
Steps to reproduce: - install recruitment - go to recruitment > configuration > job positions > duplicate a job and keep the exact same name as the original > change the department - add any application to the newly created job position - go to recruitment > applications > all applications > select the graph view > group by job Previous behavior: you only see one of the two jop positions with the same name the graph view does not handle multiple labels with the same name and only keeps the latest values when rendering Current behavior: duplicate labels are suffixed to prevent the view from confusing them opw-2214284 closes odoo/odoo#47948 X-original-commit: a77086f8bcb4498361d1183ba8af3d0663cd031b Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_model.js')
-rw-r--r--addons/web/static/src/js/views/graph/graph_model.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_model.js b/addons/web/static/src/js/views/graph/graph_model.js
index 8dcb241ae9c..21614493e3c 100644
--- a/addons/web/static/src/js/views/graph/graph_model.js
+++ b/addons/web/static/src/js/views/graph/graph_model.js
@@ -242,6 +242,7 @@ return AbstractModel.extend({
value = 1;
}
self.chart.dataPoints.push({
+ resId: dataPt[self.chart.groupBy[0]] instanceof Array ? dataPt[self.chart.groupBy[0]][0] : -1,
count: count,
value: value,
labels: labels,