From 0421a72e53d5ca669d69bf6aa0f0c8ec3d77aafb Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Tue, 13 Sep 2022 10:01:48 +0000 Subject: [PATCH] [FIX] stock: get weight of destination package To reproduce the issue: (Need delivery) 1. In Settings, enable "Packages" 2. Create a product P: - Type: Consumable - Weight: 1kg 3. Create and confirm a SO with 1 x P 4. Open the related Delivery Order 5. Put in pack 5. Open the detailed operations of P 6. Edit the destination package Error: on the package form, the computed weight is 0kg, it should be 1kg We should provide the `picking_id` in the context so that the compute method can do its job: https://github.com/odoo/odoo/blob/5a8690b35a2fa9c5ed81d858ac0d170beaabaaf9/addons/delivery/models/stock_picking.py#L14-L18 OPW-2972868 closes odoo/odoo#100099 X-original-commit: d11d6662a470e3a078fb2162a775ad35d9228cb7 Signed-off-by: Arnold Moyaux (arm) Signed-off-by: Adrien Widart --- addons/stock/views/stock_move_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 4a3d171c1c7..0cd126aa50e 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -246,7 +246,7 @@ attrs="{'readonly': ['&', ('package_level_id', '!=', False), ('parent.picking_type_entire_packs', '=', True)]}" invisible="not context.get('show_lots_text')"/> - +