From 33be55acb382eeea37e95383368a6de3bc96667a Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 8 Feb 2023 11:07:43 +0100 Subject: [PATCH] des: adapt to changes in intrastat_base In intrastat_base, the 'intrastat' field of account.fiscal.position is now a selection field with 3 possible values: b2b/b2c/no --- l10n_fr_intrastat_service/models/intrastat_service.py | 3 +-- l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/l10n_fr_intrastat_service/models/intrastat_service.py b/l10n_fr_intrastat_service/models/intrastat_service.py index dc2a75a9b..d6c30152b 100644 --- a/l10n_fr_intrastat_service/models/intrastat_service.py +++ b/l10n_fr_intrastat_service/models/intrastat_service.py @@ -152,8 +152,7 @@ def _prepare_domain(self): ("invoice_date", "<=", self.end_date), ("invoice_date", ">=", self.start_date), ("state", "=", "posted"), - ("intrastat_fiscal_position", "=", True), - ("fiscal_position_id.vat_required", "=", True), + ("intrastat_fiscal_position", "=", "b2b"), ("company_id", "=", self.company_id.id), ] return domain diff --git a/l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py b/l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py index e88a5db6e..3682d6285 100644 --- a/l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py +++ b/l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py @@ -40,7 +40,7 @@ def setUpClass(cls): cls.fp_eu_b2b = cls.env["account.fiscal.position"].create( { "name": "EU B2B", - "intrastat": True, + "intrastat": "b2b", "vat_required": True, } )