Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have my own module which calls an API to get some data.
I just want pass this API data, located in my own module, to the invoice line to create a new invoice.
Thanks to all in advance! =)
Hello my friend;
For this you need to work with XML_RPC or Curl.
Here are some examples and links to know how to work with:
import pycurl, json
from StringIO import StringIO
github_url = 'Your_api_link
buffer = StringIO()
c = pycurl.Curl()
c.setopt(pycurl.HTTPHEADER, ['X-Postmark-Server-Token: API_TOKEN_HERE','Accept: application/json'])
body = buffer.getvalue()
resp = json.loads(body)
if resp['result'] != 'ok' :
print 'Error : (' + resp['error_code'] +')' + resp['error']
for gr in resp['list'] :
Good LUCK & Regards.
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
|Asked: 9/10/15, 4:49 AM|
|Seen: 1015 times|
|Last updated: 9/10/15, 6:23 AM|