From 3d12183ebdf8fbcea60736bc8f11a555f6278947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 30 Nov 2024 23:43:00 +0100 Subject: [PATCH] Return credit limit amount for sale in company currency Closes #13718 --- modules/sale_credit_limit/sale.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/sale_credit_limit/sale.py b/modules/sale_credit_limit/sale.py index f811a553e8..0e4ebff75f 100644 --- a/modules/sale_credit_limit/sale.py +++ b/modules/sale_credit_limit/sale.py @@ -13,7 +13,10 @@ class Sale(metaclass=PoolMeta): @property def credit_limit_amount(self): "Amount to check against credit limit" - return self.untaxed_amount + pool = Pool() + Currency = pool.get('currency.currency') + return Currency.compute( + self.currency, self.untaxed_amount, self.company.currency) @classmethod @ModelView.button