From 4756d59c8a9a25af394d99e27effb05ad3648df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 8 Jan 2023 17:51:20 +0100 Subject: [PATCH] Fallback to 0 when price list is not setting price ratio of components Closes #11947 (grafted from 3d7d5452040338cd6c9bec7fc3cde91c4e1f9585) --HG-- branch : 6.0 --- modules/product_kit/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/product_kit/common.py b/modules/product_kit/common.py index 56996908f6..b50178f4ec 100644 --- a/modules/product_kit/common.py +++ b/modules/product_kit/common.py @@ -281,7 +281,7 @@ def order_line_component_mixin(prefix): for component in components: product = component.product list_price = Uom.compute_price( - product.default_uom, product.list_price, + product.default_uom, product.list_price_used or 0, component.unit) if component.fixed: list_price *= Decimal(str(component.quantity / quantity))