diff --git a/modules/account_cash_rounding/currency.py b/modules/account_cash_rounding/currency.py index 1fa4d99598..a5c85b7592 100644 --- a/modules/account_cash_rounding/currency.py +++ b/modules/account_cash_rounding/currency.py @@ -13,7 +13,11 @@ class Currency(metaclass=PoolMeta): cash_rounding = fields.Numeric( "Cash Rounding Factor", - digits=(None, Eval('digits', None))) + digits=(None, Eval('digits', None)), + domain=['OR', + ('cash_rounding', '=', None), + ('cash_rounding', '>', 0), + ]) def cash_round(self, amount, rounding=ROUND_HALF_EVEN, opposite=False): if opposite: