Friday, March 22, 2024
1 change · master
Code cleanup and technical improvements
This update simplifies internal grouping logic used across several Odoo apps, reducing duplicated code and making future maintenance easier. Users should see the same grouping behavior in views and reports, with lower risk of inconsistencies between modules.
Original PR description
### [REF] *: use the default group_expand of fields.Selection The selection field already has a method for `group_expand` (which expands each selection value) called `_default_group_expand`. Unfortunately, it is undocumented and unknown. Use it if possible and remove any clones of it. ### [REF] core, *: remove order parameter of group_expand methods The order sent to group_expand is either None (groups on non-relational fields) or equal to the comodel _order. The only exception is when the order is reversed. To simplify the API, remove this parameter and instead reverse the result if the order is reversed. https://github.com/odoo/odoo/pull/139294