From 01b27664dd0161919e14841875fa4f8cd79eed6d Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Tue, 19 Jan 2021 09:31:42 +0000 Subject: [PATCH] [FIX] account: Fix automatic entry wizard with change_account 'percentage' is computed by default whatever the wizard action (change_period/change_account) but there is a constraint raised when the percentage is != 100 in change_account. closes odoo/odoo#64743 X-original-commit: 20d6efa817a4d839777c81d403bb8770807e784a Signed-off-by: oco-odoo --- addons/account/wizard/account_automatic_entry_wizard.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/account/wizard/account_automatic_entry_wizard.py b/addons/account/wizard/account_automatic_entry_wizard.py index 9187f0a8e0c..4c572db723c 100644 --- a/addons/account/wizard/account_automatic_entry_wizard.py +++ b/addons/account/wizard/account_automatic_entry_wizard.py @@ -49,8 +49,6 @@ class AutomaticEntryWizard(models.TransientModel): for record in self: if not (0.0 < record.percentage <= 100.0) and record.action == 'change_period': raise UserError(_("Percentage must be between 0 and 100")) - if record.percentage != 100 and record.action != 'change_period': - raise UserError(_("Percentage can only be set for Change Period method")) @api.depends('percentage', 'move_line_ids') def _compute_total_amount(self):