[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 <oco-odoo@users.noreply.github.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user