From 27efc62cb96b90cffe70fb5a3d27243c9331c69b Mon Sep 17 00:00:00 2001 From: Ethan Hildick Date: Mon, 11 Mar 2024 18:17:47 +0100 Subject: [PATCH] [FIX] l10n_es_aeat_sii_match: Check company when choosing certs --- l10n_es_aeat_sii_match/models/aeat_sii_match_report.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/l10n_es_aeat_sii_match/models/aeat_sii_match_report.py b/l10n_es_aeat_sii_match/models/aeat_sii_match_report.py index 46d09402c9e..fb26dd30148 100644 --- a/l10n_es_aeat_sii_match/models/aeat_sii_match_report.py +++ b/l10n_es_aeat_sii_match/models/aeat_sii_match_report.py @@ -371,7 +371,9 @@ def _get_invoices_from_sii(self): if sii_match_report.invoice_type == "in": mapping_key = "in_invoice" serv = ( - self.env["account.move"].search([], limit=1)._connect_sii(mapping_key) + self.env["account.move"] + .search([("company_id", "in", [self.company_id.id, False])], limit=1) + ._connect_sii(mapping_key) ) header = sii_match_report._get_sii_header() match_vals = {}