From 0994533e8ee8cbe803b60fcee4a5438cd4fdd6a0 Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Wed, 18 Nov 2020 13:43:58 +0000 Subject: [PATCH] [FIX] account: reconciliation model with percentage >100 To reproduce the error: 1. Invoicing > Reconciliation Models > Create 2. Add name 3. (Counterpart Values) Add a line - Amount Type: Percentage of balance - Amount: Something bigger than 100 4. Save => UserError raised ("The amount is not a percentage") This is an error. A user should be able to set a percentage greater than 100. The fix removes the constraint. OPW-2375462 closes odoo/odoo#62010 X-original-commit: 2776209ba9a437c413dd5670c1695a06da909a5a Signed-off-by: adwid --- addons/account/models/account_reconcile_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_reconcile_model.py b/addons/account/models/account_reconcile_model.py index f1cfc81c787..51b5088ad71 100644 --- a/addons/account/models/account_reconcile_model.py +++ b/addons/account/models/account_reconcile_model.py @@ -94,7 +94,7 @@ class AccountReconcileModelLine(models.Model): for record in self: if record.amount_type == 'fixed' and record.amount == 0: raise UserError(_('The amount is not a number')) - if record.amount_type == 'percentage' and not 0 < record.amount <= 100: + if record.amount_type == 'percentage' and not 0 < record.amount: raise UserError(_('The amount is not a percentage')) if record.amount_type == 'regex': try: