diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 180f59711be..ffccdc0109c 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -8801,12 +8801,6 @@ msgid "" "proceeding." msgstr "" -#. module: account -#: code:addons/account/models/account_cash_rounding.py:0 -#, python-format -msgid "Please set a positive rounding value." -msgstr "" - #. module: account #: code:addons/account/models/account_reconcile_model.py:0 #, python-format @@ -8814,6 +8808,12 @@ msgid "" "Please set at least one of the match texts to create a partner mapping." msgstr "" +#. module: account +#: code:addons/account/models/account_cash_rounding.py:0 +#, python-format +msgid "Please set a strictly positive rounding value." +msgstr "" + #. module: account #: model_terms:ir.ui.view,arch_db:account.report_invoice_document msgid "Please use the following communication for your payment :" diff --git a/addons/account/models/account_cash_rounding.py b/addons/account/models/account_cash_rounding.py index f71ece8460f..b4cb8a23560 100644 --- a/addons/account/models/account_cash_rounding.py +++ b/addons/account/models/account_cash_rounding.py @@ -16,7 +16,7 @@ class AccountCashRounding(models.Model): _description = 'Account Cash Rounding' name = fields.Char(string='Name', translate=True, required=True) - rounding = fields.Float(string='Rounding Precision', required=True, + rounding = fields.Float(string='Rounding Precision', required=True, default=0.01, help='Represent the non-zero value smallest coinage (for example, 0.05).') strategy = fields.Selection([('biggest_tax', 'Modify tax amount'), ('add_invoice_line', 'Add a rounding line')], string='Rounding Strategy', default='add_invoice_line', required=True, @@ -31,8 +31,8 @@ class AccountCashRounding(models.Model): @api.constrains('rounding') def validate_rounding(self): for record in self: - if record.rounding < 0: - raise ValidationError(_("Please set a positive rounding value.")) + if record.rounding <= 0: + raise ValidationError(_("Please set a strictly positive rounding value.")) def round(self, amount): """Compute the rounding on the amount passed as parameter.