diff --git a/intrastat_base/__manifest__.py b/intrastat_base/__manifest__.py index 82597f4..f55040e 100644 --- a/intrastat_base/__manifest__.py +++ b/intrastat_base/__manifest__.py @@ -5,11 +5,11 @@ { "name": "Intrastat Reporting Base", - "version": "16.0.1.1.0", + "version": "17.0.1.0.0", "category": "Intrastat", "license": "AGPL-3", "summary": "Base module for Intrastat reporting", - "author": "ACSONE SA/NV, Akretion,Noviat,Odoo Community Association (OCA)", + "author": "ACSONE SA/NV,Akretion,Noviat,Odoo Community Association (OCA)", "maintainers": ["alexis-via", "luc-demeyer"], "website": "https://github.com/OCA/intrastat-extrastat", "depends": ["base_vat", "account"], @@ -20,7 +20,6 @@ "views/res_config_settings.xml", "views/intrastat.xml", "views/account_fiscal_position.xml", - "views/account_fiscal_position_template.xml", ], "demo": ["demo/intrastat_demo.xml"], "installable": True, diff --git a/intrastat_base/demo/intrastat_demo.xml b/intrastat_base/demo/intrastat_demo.xml index f19b285..7c35ea7 100644 --- a/intrastat_base/demo/intrastat_demo.xml +++ b/intrastat_base/demo/intrastat_demo.xml @@ -63,7 +63,7 @@ Shipping costs SHIP_S - service + service 30 diff --git a/intrastat_base/models/__init__.py b/intrastat_base/models/__init__.py index cea19b9..8e78bef 100644 --- a/intrastat_base/models/__init__.py +++ b/intrastat_base/models/__init__.py @@ -1,5 +1,4 @@ from . import product_template from . import res_company from . import account_fiscal_position -from . import account_fiscal_position_template from . import account_move diff --git a/intrastat_base/models/account_chart_template.py b/intrastat_base/models/account_chart_template.py deleted file mode 100644 index 0899413..0000000 --- a/intrastat_base/models/account_chart_template.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2020-2022 Akretion France (http://www.akretion.com/) -# @author: -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import models - - -class AccountChartTemplate(models.Model): - _inherit = "account.chart.template" - - def _get_fp_vals(self, company, position): - """ - Get fiscal position chart template instrastat value - to create fiscal position - """ - vals = super()._get_fp_vals(company, position) - vals["intrastat"] = position.intrastat - return vals diff --git a/intrastat_base/models/account_fiscal_position_template.py b/intrastat_base/models/account_fiscal_position_template.py deleted file mode 100644 index e4dd231..0000000 --- a/intrastat_base/models/account_fiscal_position_template.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2020-2022 Akretion France (http://www.akretion.com/) -# @author: -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, fields, models - - -class AccountFiscalPositionTemplate(models.Model): - _inherit = "account.fiscal.position.template" - - intrastat = fields.Selection( - "_intrastat_selection", - help="When set to B2B or B2C, the invoices with this fiscal position will " - "be taken into account for the generation of the intrastat reports.", - ) - - @api.model - def _intrastat_selection(self): - return self.env["account.fiscal.position"]._intrastat_selection() diff --git a/intrastat_base/models/res_company.py b/intrastat_base/models/res_company.py index 0c315b7..eb6977e 100644 --- a/intrastat_base/models/res_company.py +++ b/intrastat_base/models/res_company.py @@ -35,10 +35,9 @@ class ResCompany(models.Model): @api.depends("intrastat_remind_user_ids", "intrastat_remind_user_ids.email") def _compute_intrastat_email_list(self): for this in self: - emails = [] - for user in this.intrastat_remind_user_ids: - if user.email: - emails.append(user.email) + emails = [ + user.email for user in this.intrastat_remind_user_ids if user.email + ] this.intrastat_email_list = ",".join(emails) @api.constrains("intrastat_remind_user_ids") diff --git a/intrastat_base/tests/test_all.py b/intrastat_base/tests/test_all.py index 70913a6..98018bf 100644 --- a/intrastat_base/tests/test_all.py +++ b/intrastat_base/tests/test_all.py @@ -27,7 +27,7 @@ class TestIntrastatBase(IntrastatCommon): def test_accessory(self): with self.assertRaises(ValidationError): - self.shipping_cost.type = "consu" + self.shipping_cost.detailed_type = "consu" def test_fiscal_position(self): with self.assertRaises(ValidationError): diff --git a/intrastat_base/views/account_fiscal_position.xml b/intrastat_base/views/account_fiscal_position.xml index 7c7dbfb..ffde9da 100644 --- a/intrastat_base/views/account_fiscal_position.xml +++ b/intrastat_base/views/account_fiscal_position.xml @@ -10,7 +10,7 @@ account.fiscal.position - + diff --git a/intrastat_base/views/account_fiscal_position_template.xml b/intrastat_base/views/account_fiscal_position_template.xml deleted file mode 100644 index b05a839..0000000 --- a/intrastat_base/views/account_fiscal_position_template.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - intrastat.account.fiscal.position.form - account.fiscal.position.template - - - - - - - - - intrastat.account.fiscal.position.tree - account.fiscal.position.template - - - - - - - - - account.fiscal.position.template - - - - - - - - - - - diff --git a/intrastat_base/views/product_template.xml b/intrastat_base/views/product_template.xml index 93961c5..be100a5 100644 --- a/intrastat_base/views/product_template.xml +++ b/intrastat_base/views/product_template.xml @@ -10,15 +10,11 @@ product.template - + - + localisation module to set invisible="type != 'service'" --> + diff --git a/intrastat_base/views/res_config_settings.xml b/intrastat_base/views/res_config_settings.xml index 2c82cd9..d283781 100644 --- a/intrastat_base/views/res_config_settings.xml +++ b/intrastat_base/views/res_config_settings.xml @@ -11,16 +11,14 @@ res.config.settings - -

Intrastat

-
-
-
-
-
+ + + +
+
-
-
- + + + diff --git a/intrastat_base/views/res_partner.xml b/intrastat_base/views/res_partner.xml index 3fc4d2e..e9daf0a 100644 --- a/intrastat_base/views/res_partner.xml +++ b/intrastat_base/views/res_partner.xml @@ -21,4 +21,15 @@ + + + res.partner + + + + 1 + + + +