diff --git a/l10n_nl_tax_statement/models/account_move_line.py b/l10n_nl_tax_statement/models/account_move_line.py index d23a3df81..3de356bc7 100644 --- a/l10n_nl_tax_statement/models/account_move_line.py +++ b/l10n_nl_tax_statement/models/account_move_line.py @@ -75,9 +75,10 @@ def write(self, values): for protected_field in protected_fields_in_values: if protected_field not in invalid_fields: values.pop(protected_field) - for this in self: - this._l10n_nl_vat_statement_check_state() - return super(AccountMoveLine, self).write(values) + if self._l10n_nl_vat_statement_should_check_write(values): + for this in self: + this._l10n_nl_vat_statement_check_state() + return super().write(values) @api.model def _l10n_nl_vat_statement_should_check_write(self, values):