diff --git a/base_location_nuts/README.rst b/base_location_nuts/README.rst index 38104a5e1..26215f870 100644 --- a/base_location_nuts/README.rst +++ b/base_location_nuts/README.rst @@ -1,4 +1,5 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 ============ @@ -48,7 +49,7 @@ in order to allow to assign them to partner object. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/134/10.0 + :target: https://runbot.odoo-community.org/runbot/134/11.0 Bug Tracker =========== diff --git a/base_location_nuts/__init__.py b/base_location_nuts/__init__.py index 35e7c9600..9b4296142 100644 --- a/base_location_nuts/__init__.py +++ b/base_location_nuts/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- - from . import models from . import wizard diff --git a/base_location_nuts/__manifest__.py b/base_location_nuts/__manifest__.py index 1396bf520..dfe8ccedb 100644 --- a/base_location_nuts/__manifest__.py +++ b/base_location_nuts/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2016 Jairo Llopis # Copyright 2017 David Vidal @@ -7,9 +6,9 @@ { 'name': 'NUTS Regions', 'category': 'Localisation/Europe', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'depends': [ - 'sales_team', + 'contacts', ], 'data': [ 'views/res_country_view.xml', @@ -23,7 +22,7 @@ ], 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', - 'website': 'https://www.tecnativa.com', + 'website': 'https://github.com/OCA/partner-contact/', 'license': 'AGPL-3', 'installable': True, } diff --git a/base_location_nuts/models/__init__.py b/base_location_nuts/models/__init__.py index 9f362acc6..3adc67d74 100644 --- a/base_location_nuts/models/__init__.py +++ b/base_location_nuts/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from . import res_country from . import res_partner from . import res_partner_nuts diff --git a/base_location_nuts/models/res_country.py b/base_location_nuts/models/res_country.py index 677c8086d..c06850e51 100644 --- a/base_location_nuts/models/res_country.py +++ b/base_location_nuts/models/res_country.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2016 Jairo Llopis # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). diff --git a/base_location_nuts/models/res_partner.py b/base_location_nuts/models/res_partner.py index a623a37f6..9524c3a75 100644 --- a/base_location_nuts/models/res_partner.py +++ b/base_location_nuts/models/res_partner.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2016 Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/base_location_nuts/models/res_partner_nuts.py b/base_location_nuts/models/res_partner_nuts.py index b61da0313..25e232937 100644 --- a/base_location_nuts/models/res_partner_nuts.py +++ b/base_location_nuts/models/res_partner_nuts.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2016 Jairo Llopis # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). diff --git a/base_location_nuts/tests/__init__.py b/base_location_nuts/tests/__init__.py index d04b777eb..8399f6d43 100644 --- a/base_location_nuts/tests/__init__.py +++ b/base_location_nuts/tests/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import test_base_location_nuts diff --git a/base_location_nuts/tests/test_base_location_nuts.py b/base_location_nuts/tests/test_base_location_nuts.py index f523d8412..6c1d68e0b 100644 --- a/base_location_nuts/tests/test_base_location_nuts.py +++ b/base_location_nuts/tests/test_base_location_nuts.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/base_location_nuts/views/res_partner_nuts_view.xml b/base_location_nuts/views/res_partner_nuts_view.xml index 610a6c245..3e1c56423 100644 --- a/base_location_nuts/views/res_partner_nuts_view.xml +++ b/base_location_nuts/views/res_partner_nuts_view.xml @@ -68,7 +68,7 @@ diff --git a/base_location_nuts/wizard/__init__.py b/base_location_nuts/wizard/__init__.py index b5a60faa3..d6a5945e6 100644 --- a/base_location_nuts/wizard/__init__.py +++ b/base_location_nuts/wizard/__init__.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - from . import nuts_import diff --git a/base_location_nuts/wizard/nuts_import.py b/base_location_nuts/wizard/nuts_import.py index ddca652ec..c756b6257 100644 --- a/base_location_nuts/wizard/nuts_import.py +++ b/base_location_nuts/wizard/nuts_import.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antonio Espinosa # Copyright 2016 Jairo Llopis # Copyright 2017 David Vidal @@ -79,7 +78,7 @@ class NutsImport(models.TransientModel): def _mapping(self, node): item = {} - for k, v in self._map.iteritems(): + for k, v in self._map.items(): field_xpath = v.get('xpath', '') field_attrib = v.get('attrib', False) field_type = v.get('type', 'string') @@ -118,11 +117,11 @@ class NutsImport(models.TransientModel): if not url_params: url_params = URL_PARAMS url = url_base + url_path + '?' - url += '&'.join([k + '=' + v for k, v in url_params.iteritems()]) + url += '&'.join([k + '=' + v for k, v in url_params.items()]) logger.info('Starting to download %s' % url) try: res_request = requests.get(url) - except Exception, e: + except Exception as e: raise UserError( _('Got an error when trying to download the file: %s.') % str(e)) @@ -133,15 +132,15 @@ class NutsImport(models.TransientModel): logger.info('Download successfully %d bytes' % len(res_request.content)) # Workaround XML: Remove all characters before Import NUTS 2013 from RAMON - You can import NUTS from RAMON european service. 20 - automatic