Files
odoo_source/addons/web
Hubert Van De Walle c6640ddafd [FIX] web: keep group order when restoring empty kanban group
Steps to reproduce
==================

- Go to Field Service
- Group by "start date: week"
- Archive every record in a column until there is only one left
- Go back to the kanban view
- Click on the single record from the column
- Archive it
- Using the breadcrumbs, go back to the kanban view

=> The group order is not preserverd and the empty one is the last one

Cause of the issue
==================

Before archiving the record, we have the following data:
`{group1: [1], group2: [2, 3]}`

After archiving the record, we have `{group2: [2, 3], group1: []}`

A new group is recreated from the old one, but it is always added at the
end.

Solution
========

We can insert the old group at his previous index.
The same solution was used in previous versions

opw-3816409

closes odoo/odoo#160121

X-original-commit: 0d44e931c40fbca005b8d1864cf2d07485ed84f8
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-04-04 09:52:49 +00:00
..
…