Use currency rounding when currency has no cash rounding set

Closes #14638
(grafted from c2e82186e7089618939ae9270490a68d2ca17622)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2026-03-02 15:23:13 +01:00
parent cc569e73f3
commit 87cd440a20
+5 -1
View File
@@ -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)