We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7dd2a64 + 2d30bd9 commit d158a8fCopy full SHA for d158a8f
addons/base_geolocalize/models/res_partner.py
@@ -31,7 +31,13 @@ def geo_find(addr, apikey=False):
31
if result['status'] != 'OK':
32
if result.get('error_message'):
33
_logger.error(result['error_message'])
34
- return None
+ 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)
41
42
try:
43
geo = result['results'][0]['geometry']['location']
0 commit comments