Odoo Help

0

Consume an external API on odoo V8

By
Rafael Portilla
on 3/22/17, 5:41 PM 227 views

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.

0
Rafael Portilla
On 10/12/17, 2:26 PM

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']) +")"))



About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 3/22/17, 5:41 PM
Seen: 227 times
Last updated: 10/12/17, 2:26 PM