Skip to content
Snippets Groups Projects
Commit 3bbe8d2b authored by Arnaud Joset's avatar Arnaud Joset
Browse files

[FIX] base_geolocalize: allow using the functionnality without privileges.

Before this commit, simple user could not use the novatim API since https://github.com/odoo/odoo/commit/160e8bfbf72a3e5d7cc8d8cbe7bc4f310f298baa



closes odoo/odoo#134735

Taskid: 3497580
X-original-commit: 43763618
Signed-off-by: default avatarArnaud Joset (arj) <arj@odoo.com>
parent 2b2da9b7
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@ class GeoCoder(models.AbstractModel):
return None
url = 'https://nominatim.openstreetmap.org/search'
try:
headers = {'User-Agent': self.env['ir.config_parameter'].get_param('base_geolocalize.user_agent',
headers = {'User-Agent': self.env['ir.config_parameter'].sudo().get_param('base_geolocalize.user_agent',
'Odoo (http://www.odoo.com/contactus)')}
response = requests.get(url, headers=headers, params={'format': 'json', 'q': addr})
_logger.info('openstreetmap nominatim service called')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment