From 9f2521822e08dc4e7129dc6f5b454950cb4334fb Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Tue, 31 Jul 2018 08:39:37 +0200 Subject: [PATCH] rework url-construction of goMaps --- ext/custom-addons/tz_gomaps/models/TZgMaps.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ext/custom-addons/tz_gomaps/models/TZgMaps.py b/ext/custom-addons/tz_gomaps/models/TZgMaps.py index 653fc33a..b552856b 100644 --- a/ext/custom-addons/tz_gomaps/models/TZgMaps.py +++ b/ext/custom-addons/tz_gomaps/models/TZgMaps.py @@ -10,10 +10,11 @@ class TZgoMaps(models.Model): def goMaps(self): for record in self: street = record.street+',' if record.street else '' - zip = record.zip+',' if record.zip else '' - city = record.city+',' if record.city else '' - country_code = record.country_id.code+',' if record.country_id.code else '' - gomaps_link = 'https://www.google.com/maps/place/'+street.replace('/','.')+zip+city+country_code + zip = ' '+record.zip+',' if record.zip else '' + city = ' '+record.city+',' if record.city else '' + country_code = ' '+record.country_id.code+',' if record.country_id.code else '' +# gomaps_link = 'https://www.google.com/maps/place/'+street.replace('/','.')+zip+city+country_code + gomaps_link = 'https://www.google.com/maps/place/' + street + zip + city + country_code return { 'type': 'ir.actions.act_url', 'url': '%s' % gomaps_link,