From ffbc3ee4afd612b45919d41c70678acc755629b5 Mon Sep 17 00:00:00 2001 From: "Gaetan Vanden Bergh (gavb)" Date: Wed, 15 Mar 2023 09:41:45 +0000 Subject: [PATCH] [FIX] delivery: Fix renaming of field Fix a forgotten field after a renaming after a forward conflict: [REF] *{stock,mrp}*: rename reserved fields This commit rename product_uom_qty into reserved_uom_qty and product_qty into reserved_qty on stock move line to stop mistake them with the stock move quantities fields. Task: 2648449 Part-of: #80434 opw-3225854 closes odoo/odoo#115501 X-original-commit: 022de9edabb9993bfab6dd4e45feed788b7e1c38 Signed-off-by: Tiffany Chang Signed-off-by: William Henrotin (whe) --- addons/stock_delivery/models/delivery_carrier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_delivery/models/delivery_carrier.py b/addons/stock_delivery/models/delivery_carrier.py index 8e52b81b3f8..3d0a9212f11 100644 --- a/addons/stock_delivery/models/delivery_carrier.py +++ b/addons/stock_delivery/models/delivery_carrier.py @@ -200,7 +200,7 @@ class DeliveryCarrier(models.Model): def _get_commodities_from_stock_move_lines(self, move_lines): commodities = [] for line in move_lines.filtered(lambda line: line.product_id.type in ['product', 'consu']): - qty = line.qty_done if line.state == 'done' else line.product_uom_qty + qty = line.qty_done if line.state == 'done' else line.reserved_uom_qty unit_quantity = line.product_uom_id._compute_quantity(qty, line.product_id.uom_id) rounded_qty = max(1, float_round(unit_quantity, precision_digits=0)) country_of_origin = line.product_id.country_of_origin.code or \