Browse Source

[MIG] partner_external_map: Migration to 11.0

pull/652/head
Pedro M. Baeza 7 years ago
committed by ernesto
parent
commit
5826e2bfe4
  1. 16
      partner_external_map/README.rst
  2. 12
      partner_external_map/__manifest__.py
  3. 6
      partner_external_map/models/res_partner.py

16
partner_external_map/README.rst

@ -34,11 +34,11 @@ of the address) if this information is present on the partner.
Configuration Configuration
============= =============
If you want to create additionnal map websites, go to the menu
If you want to create additional map websites, go to the menu
*Settings > Technical > Map Websites > Map Websites*. You are *Settings > Technical > Map Websites > Map Websites*. You are
invited to send the configuration information of your additionnal map websites
to one of the authors of the module, so that the module can be updated with more
pre-configured map websites.
invited to send the configuration information of your additional map websites
to one of the authors of the module, so that the module can be updated with
more pre-configured map websites.
Usage Usage
===== =====
@ -54,7 +54,7 @@ or a route map.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :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
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@ -76,8 +76,10 @@ Credits
Contributors Contributors
------------ ------------
* Alexis de Lattre <alexis.delattre@akretion.com>
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Akretion (http://www.akretion.com):
* Alexis de Lattre <alexis.delattre@akretion.com>
* Tecnativa (https://www.tecnativa.com):
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
Maintainer Maintainer
---------- ----------

12
partner_external_map/__manifest__.py

@ -1,11 +1,11 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# © 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2015-2016 Akretion - Alexis de Lattre
# Copyright 2016-2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {
'name': 'Partner External Maps', 'name': 'Partner External Maps',
'version': '10.0.1.0.0',
'version': '11.0.1.0.0',
'category': 'Extra Tools', 'category': 'Extra Tools',
'license': 'AGPL-3', 'license': 'AGPL-3',
'summary': 'Add Map and Map Routing buttons on partner form to ' 'summary': 'Add Map and Map Routing buttons on partner form to '
@ -13,8 +13,10 @@
'author': 'Akretion, ' 'author': 'Akretion, '
'Tecnativa, ' 'Tecnativa, '
'Odoo Community Association (OCA)', 'Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
'depends': ['base'],
'website': 'https://github.com/OCA/partner-contact',
'depends': [
'base',
],
'data': [ 'data': [
'views/res_partner_view.xml', 'views/res_partner_view.xml',
'views/map_website_view.xml', 'views/map_website_view.xml',

6
partner_external_map/models/res_partner.py

@ -35,10 +35,10 @@ class ResPartner(models.Model):
@api.model @api.model
def _prepare_url(self, url, replace): def _prepare_url(self, url, replace):
assert url, 'Missing URL' assert url, 'Missing URL'
for key, value in replace.iteritems():
if not isinstance(value, (str, unicode)):
for key, value in replace.items():
if not isinstance(value, str):
# for latitude and longitude which are floats # for latitude and longitude which are floats
value = unicode(value)
value = str(value)
url = url.replace(key, value) url = url.replace(key, value)
logger.debug('Final URL: %s', url) logger.debug('Final URL: %s', url)
return url return url

Loading…
Cancel
Save