Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4406 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 22
5613
0
thg 2 24
3841
2
thg 9 15
4654
0
thg 5 15
3128
1
thg 6 24
1721