diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-04-09 10:21:27 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-04-10 17:41:12 +0200 |
| commit | 36b4468d15bf96de097cfc3d7e2d5f99febb984b (patch) | |
| tree | f606b27edacf708d1476c5acc024f65f01145504 /addons/web/static/src/js/views/graph/graph_view.js | |
| parent | 47395c6e51ec82283d3cd46e386befc256d8a657 (diff) | |
[FIX] web: prevent crash in graph when grouping/aggregating on m2o
We recently added the possibility of aggregating the graph view on a
many2one field (with count distinct operator). This is useful, but then
a rare situation could happen: the view could be grouped by the same
field.
In that case, there is a name clash in the read_group, and the result
will be that the [id, nameget] of a m2o field will be used as an
aggregate.
The readgroup method should be improved (its API is a mess), but
meanwhile, we have a solution for this issue: if we group by a m2o, then
it is guaranteed that each group has an aggregate value of 1 for the
same field.
Diffstat (limited to 'addons/web/static/src/js/views/graph/graph_view.js')
0 files changed, 0 insertions, 0 deletions
