diff --git a/l10n_de_tax_statement_zm/__manifest__.py b/l10n_de_tax_statement_zm/__manifest__.py index 25683ddb1..95b376119 100644 --- a/l10n_de_tax_statement_zm/__manifest__.py +++ b/l10n_de_tax_statement_zm/__manifest__.py @@ -5,7 +5,7 @@ { "name": "German VAT Statement Extension", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "category": "Localization", "license": "AGPL-3", "author": "OpenBIG.org, Onestein, sewisoft, Odoo Community Association (OCA)", diff --git a/l10n_de_tax_statement_zm/tests/test_l10n_de_tax_statement_zm.py b/l10n_de_tax_statement_zm/tests/test_l10n_de_tax_statement_zm.py index 48fa62223..ac1ad8362 100644 --- a/l10n_de_tax_statement_zm/tests/test_l10n_de_tax_statement_zm.py +++ b/l10n_de_tax_statement_zm/tests/test_l10n_de_tax_statement_zm.py @@ -8,63 +8,62 @@ class TestTaxStatementZM(TransactionCase): - def setUp(self): - super().setUp() - - self.eur = self.env["res.currency"].search([("name", "=", "EUR")]) - self.coa = self.env.ref("l10n_de_skr03.l10n_de_chart_template", False) - self.coa = self.coa or self.env.ref( - "l10n_generic_coa.configurable_chart_template" - ) - self.company_parent = self.env["res.company"].create( + @classmethod + def setUpClass(cls): + super().setUpClass() + + cls.eur = cls.env["res.currency"].search([("name", "=", "EUR")]) + cls.coa = cls.env.ref("l10n_de_skr03.l10n_de_chart_template", False) + cls.coa = cls.coa or cls.env.ref("l10n_generic_coa.configurable_chart_template") + cls.company_parent = cls.env["res.company"].create( { "name": "Parent Company", - "country_id": self.env.ref("base.de").id, - "currency_id": self.eur.id, + "country_id": cls.env.ref("base.de").id, + "currency_id": cls.eur.id, } ) - self.env.user.company_id = self.company_parent - self.coa.try_loading() - self.env["l10n.de.tax.statement"].search([("state", "!=", "posted")]).unlink() + cls.env.user.company_id = cls.company_parent + cls.coa.try_loading() + cls.env["l10n.de.tax.statement"].search([("state", "!=", "posted")]).unlink() - self.tag_1 = self.env["account.account.tag"].create( + cls.tag_1 = cls.env["account.account.tag"].create( { "name": "+81 base", "applicability": "taxes", - "country_id": self.env.ref("base.de").id, + "country_id": cls.env.ref("base.de").id, } ) - self.tag_2 = self.env["account.account.tag"].create( + cls.tag_2 = cls.env["account.account.tag"].create( { "name": "+41 base", "applicability": "taxes", - "country_id": self.env.ref("base.de").id, + "country_id": cls.env.ref("base.de").id, } ) - self.tag_3 = self.env["account.account.tag"].create( + cls.tag_3 = cls.env["account.account.tag"].create( { "name": "+81 base", "applicability": "taxes", - "country_id": self.env.ref("base.de").id, + "country_id": cls.env.ref("base.de").id, } ) - self.tag_4 = self.env["account.account.tag"].create( + cls.tag_4 = cls.env["account.account.tag"].create( { "name": "+21 base", "applicability": "taxes", - "country_id": self.env.ref("base.de").id, + "country_id": cls.env.ref("base.de").id, } ) - self.tax_1 = self.env["account.tax"].create({"name": "Tax 1", "amount": 19}) - self.tax_1.invoice_repartition_line_ids[0].tag_ids = self.tag_1 - self.tax_1.invoice_repartition_line_ids[1].tag_ids = self.tag_2 + cls.tax_1 = cls.env["account.tax"].create({"name": "Tax 1", "amount": 19}) + cls.tax_1.invoice_repartition_line_ids[0].tag_ids = cls.tag_1 + cls.tax_1.invoice_repartition_line_ids[1].tag_ids = cls.tag_2 - self.tax_2 = self.env["account.tax"].create({"name": "Tax 2", "amount": 7}) - self.tax_2.invoice_repartition_line_ids[0].tag_ids = self.tag_3 - self.tax_2.invoice_repartition_line_ids[1].tag_ids = self.tag_4 + cls.tax_2 = cls.env["account.tax"].create({"name": "Tax 2", "amount": 7}) + cls.tax_2.invoice_repartition_line_ids[0].tag_ids = cls.tag_3 + cls.tax_2.invoice_repartition_line_ids[1].tag_ids = cls.tag_4 - self.statement_1 = self.env["l10n.de.tax.statement"].create( + cls.statement_1 = cls.env["l10n.de.tax.statement"].create( {"name": "Statement 1", "version": "2021"} ) diff --git a/setup/l10n_de_tax_statement_zm/odoo/addons/l10n_de_tax_statement_zm b/setup/l10n_de_tax_statement_zm/odoo/addons/l10n_de_tax_statement_zm new file mode 120000 index 000000000..ccb6d0773 --- /dev/null +++ b/setup/l10n_de_tax_statement_zm/odoo/addons/l10n_de_tax_statement_zm @@ -0,0 +1 @@ +../../../../l10n_de_tax_statement_zm \ No newline at end of file diff --git a/setup/l10n_de_tax_statement_zm/setup.py b/setup/l10n_de_tax_statement_zm/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/l10n_de_tax_statement_zm/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)