From 7be6f054aac34e12c2140309e4504aebdf540dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 14 Sep 2022 19:15:48 +0200 Subject: [PATCH] Always return a Decimal for shipment cost Other modules rely on having a Decimal to alter the cost. issue11688 review437341004 --- stock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stock.py b/stock.py index aad0b2ad2f..4d4baf5b24 100644 --- a/stock.py +++ b/stock.py @@ -140,6 +140,8 @@ class ShipmentCostMixin: return Currency.compute( self.cost_currency_used, self.cost_used, self.company.currency, round=False) + else: + return Decimal(0) class ShipmentOutCostMixin(ShipmentCostMixin):