Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4367 Vues

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
Ignorer
Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
févr. 22
5525
0
févr. 24
3800
2
sept. 15
4601
0
mai 15
3099
1
juin 24
1674