diff options
| author | Christophe Matthieu <chm@odoo.com> | 2017-03-27 17:42:47 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 7df1ef5305c993931ef24cfbe38290ad9597e268 (patch) | |
| tree | 84fcc15b16badc911b81e830ee181d98c147f716 /addons/web/static/src/js/views/graph/graph_model.js | |
| parent | 3deac18485876965a47efe9f742758ab525abcd9 (diff) | |
[FIX] web: graph view should properly format data
A big problem is that the read_group method has a variable API: it
sometimes returns values in a __count key, sometimes in a
[somefield]__count key.
Before this commit, the graph view was not using the correct value in
some cases.
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.js | 2 |
1 files changed, 1 insertions, 1 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 c14c698331d..877472a7bc2 100644 --- a/addons/web/static/src/js/views/graph/graph_model.js +++ b/addons/web/static/src/js/views/graph/graph_model.js @@ -164,7 +164,7 @@ return AbstractModel.extend({ return self._sanitizeValue(data_pt[field], field); }); this.chart.data.push({ - value: is_count ? data_pt.__count : data_pt[this.chart.measure], + value: is_count ? data_pt.__count || data_pt[this.chart.groupedBy[0]+'_count'] : data_pt[this.chart.measure], labels: labels }); } |
