diff --git a/addons/account/models/account_move_line.py b/addons/account/models/account_move_line.py index 852cb43fa42..3f3a68443c6 100644 --- a/addons/account/models/account_move_line.py +++ b/addons/account/models/account_move_line.py @@ -1572,9 +1572,8 @@ class AccountMoveLine(models.Model): line_to_write -= line continue - if line.parent_state == 'posted': - if any(key in vals for key in ('tax_ids', 'tax_line_id')): - raise UserError(_('You cannot modify the taxes related to a posted journal item, you should reset the journal entry to draft to do so.')) + if line.parent_state == 'posted' and any(self.env['account.move']._field_will_change(line, vals, field_name) for field_name in ('tax_ids', 'tax_line_id')): + raise UserError(_('You cannot modify the taxes related to a posted journal item, you should reset the journal entry to draft to do so.')) # Check the lock date. if line.parent_state == 'posted' and any(self.env['account.move']._field_will_change(line, vals, field_name) for field_name in protected_fields['fiscal']):