diff --git a/intrastat_base/__manifest__.py b/intrastat_base/__manifest__.py index ec74e37..4d0f6d2 100644 --- a/intrastat_base/__manifest__.py +++ b/intrastat_base/__manifest__.py @@ -1,11 +1,11 @@ -# Copyright 2011-2016 Akretion (http://www.akretion.com) -# Copyright 2018 brain-tec AG (Kumar Aberer ) +# Copyright 2011-2020 Akretion (http://www.akretion.com) +# Copyright 2018-2020 brain-tec AG (Kumar Aberer ) # Copyright 2009-2020 Noviat (http://www.noviat.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Intrastat Reporting Base", - "version": "13.0.1.1.0", + "version": "14.0.1.0.0", "category": "Intrastat", "license": "AGPL-3", "summary": "Base module for Intrastat reporting", @@ -14,6 +14,7 @@ "depends": ["base_vat", "account"], "excludes": ["account_intrastat"], "data": [ + "security/ir.model.access.csv", "data/country_data.xml", "views/product_template.xml", "views/res_partner.xml", diff --git a/intrastat_base/demo/intrastat_demo.xml b/intrastat_base/demo/intrastat_demo.xml index 5a93379..6e6cd90 100644 --- a/intrastat_base/demo/intrastat_demo.xml +++ b/intrastat_base/demo/intrastat_demo.xml @@ -1,6 +1,6 @@ @@ -18,6 +18,6 @@ service 30 - True + diff --git a/intrastat_base/models/account_tax.py b/intrastat_base/models/account_tax.py index 35966a7..ebe693b 100644 --- a/intrastat_base/models/account_tax.py +++ b/intrastat_base/models/account_tax.py @@ -1,4 +1,4 @@ -# Copyright 2011-2019 Akretion France (http://www.akretion.com). +# Copyright 2011-2020 Akretion France (http://www.akretion.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models diff --git a/intrastat_base/models/intrastat_common.py b/intrastat_base/models/intrastat_common.py index 45ad7c6..057cc8b 100644 --- a/intrastat_base/models/intrastat_common.py +++ b/intrastat_base/models/intrastat_common.py @@ -1,5 +1,5 @@ -# Copyright 2010-2016 Akretion () -# Copyright 2009-2019 Noviat (http://www.noviat.com) +# Copyright 2010-2020 Akretion () +# Copyright 2009-2020 Noviat (http://www.noviat.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import base64 @@ -102,7 +102,6 @@ class IntrastatCommon(models.AbstractModel): corresponding attachement""" action = { "name": title, - "view_type": "form", "view_mode": "form", "res_model": "ir.attachment", "type": "ir.actions.act_window", diff --git a/intrastat_base/models/product_template.py b/intrastat_base/models/product_template.py index d5cb3b4..d63656c 100644 --- a/intrastat_base/models/product_template.py +++ b/intrastat_base/models/product_template.py @@ -1,4 +1,4 @@ -# Copyright 2010-2016 Akretion () +# Copyright 2010-2020 Akretion () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models @@ -26,5 +26,5 @@ class ProductTemplate(models.Model): "this option for the product '%s' which is of type " "'%s'" ) - % (this.name, this.type) + % (this.display_name, this.type) ) diff --git a/intrastat_base/models/res_company.py b/intrastat_base/models/res_company.py index 63a0936..eefce32 100644 --- a/intrastat_base/models/res_company.py +++ b/intrastat_base/models/res_company.py @@ -1,4 +1,4 @@ -# Copyright 2013-2017 Akretion France (http://www.akretion.com/) +# Copyright 2013-2020 Akretion France (http://www.akretion.com/) # @author: # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -10,7 +10,8 @@ class ResCompany(models.Model): _inherit = "res.company" intrastat_remind_user_ids = fields.Many2many( - "res.users", + comodel_name="res.users", + relation="company_intrastat_reminder_user_rel", column1="company_id", column2="user_id", string="Users Receiving the Intrastat Reminder", diff --git a/intrastat_base/models/res_config_settings.py b/intrastat_base/models/res_config_settings.py index c208d79..25e1b37 100644 --- a/intrastat_base/models/res_config_settings.py +++ b/intrastat_base/models/res_config_settings.py @@ -1,5 +1,6 @@ -# Copyright 2017 Akretion (Alexis de Lattre ) -# Copyright 2018 brain-tec AG (Kumar Aberer ) +# Copyright 2017-2020 Akretion France (http://www.akretion.com/) +# Copyright 2018-2020 brain-tec AG (Kumar Aberer ) +# @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models diff --git a/intrastat_base/models/res_country.py b/intrastat_base/models/res_country.py index cbf2482..10743b7 100644 --- a/intrastat_base/models/res_country.py +++ b/intrastat_base/models/res_country.py @@ -1,4 +1,4 @@ -# Copyright 2011-2019 Akretion France (http://www.akretion.com/) +# Copyright 2011-2020 Akretion France (http://www.akretion.com/) # @author: # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/intrastat_base/security/ir.model.access.csv b/intrastat_base/security/ir.model.access.csv new file mode 100644 index 0000000..fbe710c --- /dev/null +++ b/intrastat_base/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_intrastat_result_view,Access on intrastat.result.view,model_intrastat_result_view,account.group_account_user,1,1,1,0 diff --git a/intrastat_base/tests/test_all.py b/intrastat_base/tests/test_all.py index 18d64d4..62b1787 100644 --- a/intrastat_base/tests/test_all.py +++ b/intrastat_base/tests/test_all.py @@ -17,4 +17,4 @@ class TestIntrastatBase(TransactionCase): demo_company = self.env.ref("base.main_company") demo_company.write({"intrastat_remind_user_ids": [(6, False, [demo_user.id])]}) # then check if intrastat_email_list contains the email of the user - self.assertEquals(demo_company.intrastat_email_list, demo_user.email) + self.assertEqual(demo_company.intrastat_email_list, demo_user.email) diff --git a/intrastat_base/views/account_tax.xml b/intrastat_base/views/account_tax.xml index 0479a6f..a135bb5 100644 --- a/intrastat_base/views/account_tax.xml +++ b/intrastat_base/views/account_tax.xml @@ -1,19 +1,18 @@ - intrastat.base.tax account.tax - + - + diff --git a/intrastat_base/views/intrastat.xml b/intrastat_base/views/intrastat.xml index 92bfba2..ca14bae 100644 --- a/intrastat_base/views/intrastat.xml +++ b/intrastat_base/views/intrastat.xml @@ -1,7 +1,7 @@ @@ -27,7 +27,7 @@
-
diff --git a/intrastat_base/views/product_template.xml b/intrastat_base/views/product_template.xml index 4dc5b90..4854cdd 100644 --- a/intrastat_base/views/product_template.xml +++ b/intrastat_base/views/product_template.xml @@ -1,6 +1,6 @@ @@ -11,9 +11,9 @@ - + + localisation module to set invisible="0" --> diff --git a/intrastat_base/views/res_country.xml b/intrastat_base/views/res_country.xml index c0e1626..5ce3edb 100644 --- a/intrastat_base/views/res_country.xml +++ b/intrastat_base/views/res_country.xml @@ -1,6 +1,7 @@ diff --git a/intrastat_base/views/res_partner.xml b/intrastat_base/views/res_partner.xml index 8c2f652..3b1d193 100644 --- a/intrastat_base/views/res_partner.xml +++ b/intrastat_base/views/res_partner.xml @@ -1,6 +1,6 @@