Hey guys,is there methods to make calls from odoo to external api through SOAP?I did it using xml-rpc and json,How can we do with SOAP?Pls Help
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
7475
أدوات العرض
You can use the "suds" python library to call the SOAP API from Odoo.
Ex:
from suds.client import Client
soap_msg = '''<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
..... some soap message
</soap:Envelope>'''
client = Client('https://soap_url_of_WSDL?WSDL')
message = client.factory.create('Message')
clientheader = client.factory.create('ClientHeader')
# Add required details in HEADER as per WSDL rule
clientheader.user = 'test' # credentials / token keys
clientheader.SendAttempt = '0'
message.ClientHeader = clientheader
res_resp = client.service.ProcessMsg(message)
I hope this will help you to give it a start.
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل