Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] web: keep col group by on 2nd reload
In 187c32c some improvements were made for conserving/restoring group bys on the pivot view. This introduced an issue on the column group by: - before reload, if we set manually a column group by (+ icon in the header) it would be saved and not lost (unless a context or filter in the search view override it) - after reload, the following manually set column group by are not saved anymore on subsequent reload (the column group by at the first reload are set back) This behavior is not normal since the behavior (conserving or losing column group bys) should be the same at first reload or second reload. The issue was caused by the duplication of group bys that were not synchronized (one on the column root header, one on the pivot model instance). Without the change, the added test failed with: "Column groupby not lost after second reload" and product_id is hidding from the object pivot_column_groupby dictionary (having only "customer"). Using _.clone on initialRowGroupBys was necessary change because without duplication of "groupbys", the initialRowGroupBys would be changed on expandHeader which is unexpected. opw-1941095 closes odoo#31407
- Loading branch information