From 87cd440a203d333d20cf61ba3d73f5ef99277f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Mar 2026 15:23:13 +0100 Subject: [PATCH] Use currency rounding when currency has no cash rounding set Closes #14638 (grafted from c2e82186e7089618939ae9270490a68d2ca17622) --HG-- branch : 6.0 --- modules/account_cash_rounding/currency.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/account_cash_rounding/currency.py b/modules/account_cash_rounding/currency.py index daf3712743..8ce8dae8fa 100644 --- a/modules/account_cash_rounding/currency.py +++ b/modules/account_cash_rounding/currency.py @@ -16,4 +16,8 @@ class Currency(metaclass=PoolMeta): depends=['digits']) def cash_round(self, amount, rounding=ROUND_HALF_EVEN): - return self._round(amount, self.cash_rounding, rounding) + if self.cash_rounding is not None: + factor = self.cash_rounding + else: + factor = self.rounding + return self._round(amount, factor, rounding)