Files
odoo_source/addons
Tiffany Chang (tic) b53d3cd726 [FIX] stock: always read field for default_order in move.line tree
Previous PR odoo/odoo#143570 moved some move line ordering logic from the
model to the view to avoid recomputing of these fields since it was
causing issues with the computes occurring at the wrong time.
Unfortunately every field used in the `default_order` in the view has to
be present in the view and since v16 any fields that have a groups
attribute that isn't met isn't loaded in the view.

Therefore we have to force the `result_package_id` to always be in the
view even if `stock.group_tracking_lot` is not true (i.e. packages are
active)

Steps to reproduce:
- create +save a receipt with a tracked product
- click on the burger button to open the detailed operations of the
  tracked product
- add 2 move lines + Confirm

Expected behavior:
the move lines save

Actual behavior:
JS traceback due to trying to sort on a field that isn't present in the
view

closes odoo/odoo#147188

Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-12-27 11:21:39 +00:00
..
2023-12-23 15:09:31 +00:00