Skip to content

Commit d158a8f

Browse files
committed
[MERGE] forward port branch 10.0 up to 2d30bd9
2 parents 7dd2a64 + 2d30bd9 commit d158a8f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

addons/base_geolocalize/models/res_partner.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ def geo_find(addr, apikey=False):
3131
if result['status'] != 'OK':
3232
if result.get('error_message'):
3333
_logger.error(result['error_message'])
34-
return None
34+
error_msg = _('Unable to geolocate, received the error:\n%s'
35+
'\n\nGoogle made this a paid feature.\n'
36+
'You should first enable billing on your Google account.\n'
37+
'Then, go to Developer Console, and enable the APIs:\n'
38+
'Geocoding, Maps Static, Maps Javascript.\n'
39+
% result['error_message'])
40+
raise UserError(error_msg)
3541

3642
try:
3743
geo = result['results'][0]['geometry']['location']

0 commit comments

Comments
 (0)