From 9a74af1288f20c7662a28c81f8beb0fe72f4f2b5 Mon Sep 17 00:00:00 2001 From: Andrii Skrypka Date: Thu, 18 Mar 2021 20:50:06 +0200 Subject: [PATCH] [MIG] base_location_nuts: Migration to 14.0 --- base_location_nuts/README.rst | 10 +++++----- base_location_nuts/__manifest__.py | 2 +- base_location_nuts/models/res_partner.py | 16 ++++++++++++---- base_location_nuts/security/ir.model.access.csv | 1 + base_location_nuts/static/description/index.html | 8 ++++---- .../tests/test_base_location_nuts.py | 2 +- base_location_nuts/wizard/nuts_import.py | 9 +++++---- 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/base_location_nuts/README.rst b/base_location_nuts/README.rst index 7ca77b402..18a422489 100644 --- a/base_location_nuts/README.rst +++ b/base_location_nuts/README.rst @@ -14,13 +14,13 @@ NUTS Regions :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github - :target: https://github.com/OCA/partner-contact/tree/13.0/base_location_nuts + :target: https://github.com/OCA/partner-contact/tree/14.0/base_location_nuts :alt: OCA/partner-contact .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-base_location_nuts + :target: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-base_location_nuts :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/134/13.0 + :target: https://runbot.odoo-community.org/runbot/134/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -80,7 +80,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -117,6 +117,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/partner-contact `_ project on GitHub. +This module is part of the `OCA/partner-contact `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_location_nuts/__manifest__.py b/base_location_nuts/__manifest__.py index 71a91b39d..8a730540a 100644 --- a/base_location_nuts/__manifest__.py +++ b/base_location_nuts/__manifest__.py @@ -6,7 +6,7 @@ { "name": "NUTS Regions", "category": "Localisation/Europe", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "depends": ["contacts"], "data": [ "views/res_country_view.xml", diff --git a/base_location_nuts/models/res_partner.py b/base_location_nuts/models/res_partner.py index 0ff9018f2..5941ea0aa 100644 --- a/base_location_nuts/models/res_partner.py +++ b/base_location_nuts/models/res_partner.py @@ -9,16 +9,24 @@ class ResPartner(models.Model): _inherit = "res.partner" nuts1_id = fields.Many2one( - comodel_name="res.partner.nuts", domain=[("level", "=", 1)], string="NUTS L1" + comodel_name="res.partner.nuts", + domain=[("level", "=", 1)], + string="NUTS L1", ) nuts2_id = fields.Many2one( - comodel_name="res.partner.nuts", domain=[("level", "=", 2)], string="NUTS L2" + comodel_name="res.partner.nuts", + domain=[("level", "=", 2)], + string="NUTS L2", ) nuts3_id = fields.Many2one( - comodel_name="res.partner.nuts", domain=[("level", "=", 3)], string="NUTS L3" + comodel_name="res.partner.nuts", + domain=[("level", "=", 3)], + string="NUTS L3", ) nuts4_id = fields.Many2one( - comodel_name="res.partner.nuts", domain=[("level", "=", 4)], string="NUTS L4" + comodel_name="res.partner.nuts", + domain=[("level", "=", 4)], + string="NUTS L4", ) def _onchange_nuts(self, level): diff --git a/base_location_nuts/security/ir.model.access.csv b/base_location_nuts/security/ir.model.access.csv index af492e49e..67260294d 100644 --- a/base_location_nuts/security/ir.model.access.csv +++ b/base_location_nuts/security/ir.model.access.csv @@ -1,3 +1,4 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_res_partner_nuts_user_all","res_partner_nuts group_partner_manager_all","model_res_partner_nuts","",1,0,0,0 "access_res_partner_nuts_user","res_partner_nuts group_partner_manager","model_res_partner_nuts","base.group_partner_manager",1,1,1,1 +"access_nuts_import","nuts.import access","model_nuts_import","base.group_partner_manager",1,1,1,1 diff --git a/base_location_nuts/static/description/index.html b/base_location_nuts/static/description/index.html index 639c23053..60993bf17 100644 --- a/base_location_nuts/static/description/index.html +++ b/base_location_nuts/static/description/index.html @@ -3,7 +3,7 @@ - + NUTS Regions