From 8df5d82b141858a3d74e6711a40112840bb3279c Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Wed, 20 Dec 2023 12:39:24 +0000 Subject: [PATCH] [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#147025 X-original-commit: 79f12edca476861dad2f2bf4f7d7f304fe84146e Signed-off-by: Quentin Wolfs (quwo) Signed-off-by: Tiffany Chang (tic) --- addons/stock/views/stock_move_views.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index b60465aff5631..1559d9ef1a446 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -225,6 +225,7 @@ +