Files
odoo_source/addons/base_geolocalize
Yannick Tivisse dc3ad1381f [FIX] base_geolocalize: Partial revert of #84266
Purpose
=======

This @depends could be 'dangerous' because it would trigger a
lot of calls to the GeoIP API.

It would be more reasonable to make it lazy instead.

So we just reset the geolocation to 0 when the address is modified
without providing the new values, and the user can manually trigger
the geolocation again when needed.

For FSM, it will be updated when needed as the computation is
triggered when the geolocation information is empty.

Part-of: odoo/odoo#84890
2022-02-18 14:29:20 +00:00
..
…
…
…

Partner geolocalize

Contacts geolocation API to convert partner addresses into GPS coordinates.

Configure

You can configure in General Settings the default provider of the geolocation API service.

A method _call_<service> should be implemented in object base.geocoder that accepts an address string as parameter and return (latitude, longitude) tuple for this to work. If no default provider is set, the first one will be used by default.

An optional method _geo_query_address_<service> which takes address fields as parameters can be defined to encode the query string for the provider.