Files
odoo_source/addons/web
Lucas Perais 47f5e62288 [FIX] web: sample server grouped by a date range
Have a kanban view by default grouped by a date field, with a granularity
eg: "date:month".

Have no data so that the read group returns with only the groups for the range (fill temporal).
Those groups should have a count of zero, triggering the sample server to make up data.

Before this commit, there were multiple crashes basically because the groupby written
as field:granularity was not handled at least in the case were groups are returned by the server.
That is, from the sample server perspective, groups are reused and records are just made up
matching those groups.
There were two issues in fact:
- the groupBy with granularity (eg: date:month) was not properly handled, sometimes not splitting
the field name and the granularity, sometimes splitting those up where it should not.
- since the RelationalModel's groups are re-used verbatim by the sample server
(which still needs to return what the real web_read_group would), the "__range" data was missing,
since it had been transformed by the RelationalModel after the real call to web_read_group to the server.

After this commit, this use case is supported.

opw-3063067

closes odoo/odoo#107529

X-original-commit: 060b237f3caac5241130915b41a34aab7d28f4cb
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-12-12 18:16:07 +01:00
..
2022-10-06 14:56:52 +02:00