Skip to Content
Menú
This question has been flagged
1 Respondre
4351 Vistes

I am new using odoo and I have to connect odoo V8 with other API application. I learn how to consume the API from Python code and work fine, but I can't find documentation about how consume it using odoo. I appreciate any help.

Avatar
Descartar
Autor Best Answer

In my case was so simple like install google map library on my Ubuntu server an consume it inside a method.


import googlemaps

gmaps = googlemaps.Client(key='my_especial_key')

geocode_result = gmaps.geocode(street + ", " + street2 + ", " + city + ", " + zip)


raise osv.except_osv(("Warning!"), (str(geocode_result[0]['formatted_address']) + " (lat: " +str(geocode_result[0]['geometry']['location']['lat']) + ") (lng: "+ str(geocode_result[0]['geometry']['location']['lng']) +")"))



Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de febr. 22
5514
0
de febr. 24
3792
2
de set. 15
4587
0
de maig 15
3090
1
de juny 24
1668