summaryrefslogtreecommitdiff
path: root/addons/account/wizard
diff options
context:
space:
mode:
authorLaurent Smet <las@odoo.com>2021-01-19 09:31:42 +0000
committerLaurent Smet <las@odoo.com>2021-01-19 09:31:42 +0000
commit20d6efa817a4d839777c81d403bb8770807e784a (patch)
tree3a570ba505e7654946a0b3b126ef28c6386ad3eb /addons/account/wizard
parent5495808c6504b3c8a026be92e53bb62326a1164f (diff)
[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#64736 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/account/wizard')
-rw-r--r--addons/account/wizard/account_automatic_entry_wizard.py2
1 files changed, 0 insertions, 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):