Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] l10n_it_fatturapa_in: Fixed singleton error on field computation #2350

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions l10n_it_fatturapa_in/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ def e_inv_dati_ritenuta(self):
"invoice_date",
)
def _compute_e_invoice_validation_error(self):
self.ensure_one()
self.e_invoice_validation_error = False
self.e_invoice_validation_message = False
other_account_moves = self

bills_to_check = self.filtered(
lambda inv: inv.is_purchase_document()
Expand Down Expand Up @@ -247,6 +245,12 @@ def _compute_e_invoice_validation_error(self):
continue
bill.e_invoice_validation_error = True
bill.e_invoice_validation_message = ",\n".join(error_messages) + "."
other_account_moves -= bill

other_account_moves.write({
'e_invoice_validation_error': False,
'e_invoice_validation_message': False,
})

def name_get(self):
result = super(AccountInvoice, self).name_get()
Expand Down