[Fix] Use maps.google.com and not .be (as for thumbail who use the api .com).

[IMP] Add zoom 10 by default
[FIX] Escape False in address for google search

bzr revid: jke@openerp.com-20140130111349-l90w9larrntv83hh
This commit is contained in:
jke-openerp 2014-01-30 12:13:49 +01:00
parent c38e65d343
commit 516a85cecc
1 changed files with 3 additions and 2 deletions

View File

@ -605,9 +605,10 @@ class res_partner(osv.osv):
def google_map_link(self, cr, uid, ids, zoom=8, context=None):
partner = self.browse(cr, uid, ids[0], context=context)
params = {
'q': '%s, %s %s, %s' % (partner.street, partner.city, partner.zip, partner.country_id and partner.country_id.name_get()[0][1] or ''),
'q': '%s, %s %s, %s' % (partner.street or '', partner.city or '', partner.zip or '', partner.country_id and partner.country_id.name_get()[0][1] or ''),
'z': 10
}
return urlplus('https://maps.google.be/maps' , params)
return urlplus('https://maps.google.com/maps' , params)
class res_company(osv.osv):
_inherit = "res.company"