In pivot view, a cell data is determined by his row/column key which
are the value chain of field values to get to that row/column.
If you had a grouping with value in a cell and then close the grouping,
you could somehow get the old value back wrongly on next grouping
operations.
This happened because:
- the key was computed based on the value (eg. for relational field the
record ID) but without the field name.
- succeeding read_group only fill existing values.
eg. If on pivot view we had a salesperson with same ID as product
category, if we closed salesperson grouping then opened product
category grouping, we could possibly get the cell value to the product
category that has the same ID as the salesperson.
With this changeset, we clear the cell data corresponding to a grouping
that has been closed.
Added test without the fix would fail by displaying data of a previous
read_group that should have been cleared inbetween.
opw-2262306
closes#55129closesodoo/odoo#55936
X-original-commit: f1df73adca4955561814d4b8e90a62d7d50c1c33
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>