Commit Graph

4 Commits

Author SHA1 Message Date
xmo-odoo c50745f1a1 [FIX] base_geolocalize: geocode errors out on empty address
It's unclear whether that's a recent change or a long-standing issue,
however currently if geocode is called with an empty address string it
will reply with a 400 Bad Request, which gets raised as an exception and
forwarded to the user. That is not a great experience.

Shortcut the entire thing and just return None (= geolocation failed /
no geolocation) on trying to geolocate an empty address.

OPW-746686

backport of 74a89bcf5c656a0a64f2a699444d39739ff7f1d2
2017-06-09 16:52:31 +02:00
Jeremy Kersten f4aa509283 [FIX] base_geolocalize: use urllib2 to make request
For an unknown reason, in some case, urllib doesn't work while with urllib2 it works.
Since we don't have the opposite case until now (work in urllib and not urllib2), we
considere that it fixes the issue.

this commit closes #14636
2017-05-30 16:47:54 +02:00
Denis Ledoux 36bf774d20 [MERGE] forward port of branch 7.0 up to 43cf6d5 2014-12-17 14:05:44 +01:00
Thibault Delavallée cc59f2d77a [REF] crm_partner_assign: moved geolocalization stuff of res.partner inside a dedicated module.
[ADD] base_geolocalize, holding partner latitude, longitude and stuff necessary
for geo-localisation. This module will be used for the website, to be able to
use geo localization without having to rely on crm_partner_assign.

crm_partner_assign now contains the logic related to partner assignment and
opportunities geo localization.

bzr revid: tde@openerp.com-20131007144135-mwnpdznojr0ece7u
2013-10-07 16:41:35 +02:00