diff --git a/l10n_fr_intrastat_service/__manifest__.py b/l10n_fr_intrastat_service/__manifest__.py index 3fcfebbc3..1a912f473 100644 --- a/l10n_fr_intrastat_service/__manifest__.py +++ b/l10n_fr_intrastat_service/__manifest__.py @@ -4,7 +4,7 @@ { "name": "DES", - "version": "14.0.1.1.0", + "version": "16.0.1.0.0", "category": "Localisation/Report Intrastat", "license": "AGPL-3", "summary": "Module for Intrastat service reporting (DES) for France", diff --git a/l10n_fr_intrastat_service/models/intrastat_service.py b/l10n_fr_intrastat_service/models/intrastat_service.py index a533f275f..dc2a75a9b 100644 --- a/l10n_fr_intrastat_service/models/intrastat_service.py +++ b/l10n_fr_intrastat_service/models/intrastat_service.py @@ -194,7 +194,7 @@ def generate_service_lines(self): regular_product_in_invoice = False for line in invoice.invoice_line_ids.filtered( - lambda x: not x.display_type and x.product_id + lambda x: x.display_type == "product" and x.product_id ): # If we have a regular product/consu in the invoice, we # don't take the is_accessory_cost in DES (it will be in DEB) 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 7fa3547fe..e88a5db6e 100644 --- a/l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py +++ b/l10n_fr_intrastat_service/tests/test_fr_intrastat_service.py @@ -8,15 +8,14 @@ from dateutil.relativedelta import relativedelta from lxml import etree +from odoo.exceptions import UserError from odoo.tests import tagged -from odoo.tests.common import SavepointCase +from odoo.tests.common import TransactionCase from odoo.tools import float_compare -from odoo.exceptions import UserError @tagged("post_install", "-at_install") -class TestFrIntrastatService(SavepointCase): - +class TestFrIntrastatService(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() diff --git a/setup/l10n_fr_intrastat_service/odoo/addons/l10n_fr_intrastat_service b/setup/l10n_fr_intrastat_service/odoo/addons/l10n_fr_intrastat_service new file mode 120000 index 000000000..af14383ee --- /dev/null +++ b/setup/l10n_fr_intrastat_service/odoo/addons/l10n_fr_intrastat_service @@ -0,0 +1 @@ +../../../../l10n_fr_intrastat_service \ No newline at end of file diff --git a/setup/l10n_fr_intrastat_service/setup.py b/setup/l10n_fr_intrastat_service/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/l10n_fr_intrastat_service/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)