From e8d49f3720b5d4d2eafec77ac1db16fe2b39a666 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 8 Jan 2025 09:25:32 +0100 Subject: [PATCH] [FIX] l10n_es_aeat_sii_oca: cancel one invoice If we really want to cancel just one invoice we should send the whole recordset, as the effect will be looping over the same tasks over and over again. TT52550 --- l10n_es_aeat_sii_oca/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_es_aeat_sii_oca/models/account_move.py b/l10n_es_aeat_sii_oca/models/account_move.py index ddf9bcedbd3..e978e4d965e 100644 --- a/l10n_es_aeat_sii_oca/models/account_move.py +++ b/l10n_es_aeat_sii_oca/models/account_move.py @@ -713,7 +713,7 @@ def cancel_sii(self): else: eta = company._get_sii_eta() new_delay = ( - self.sudo() + invoice.sudo() .with_context(company_id=company.id) .with_delay(eta=eta) .cancel_one_invoice()