python - Do Odoo webhooks work in Odoo on-premise? - Stack Overflow

I have an instance of Odoo in SH and with it I created webhooks and automated quite a few processes.No

I have an instance of Odoo in SH and with it I created webhooks and automated quite a few processes. Now I am trying to do the same with an on-premise Odoo instance installed on a non-Odoo server.

First I tried something simple like this:

import requests
import json

URL = "server-url"

headers = {"Content-Type": "application/json"}

payload = {
    "name": "Registro usando webhook y python",
    "email_from": "[email protected]",
    "phone": "32733888",
    "partner_id": 2,
    "user_id": 2,
}

json_data = json.dumps(payload)

response = requests.post(URL, headers=headers, data=json_data)

print(response.status_code)
print(response.text)

But I get this error:

404
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

Obviously the url I am sending is not the one I put in the example, it is just for security.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745086897a4610459.html

相关推荐

  • python - Do Odoo webhooks work in Odoo on-premise? - Stack Overflow

    I have an instance of Odoo in SH and with it I created webhooks and automated quite a few processes.No

    15小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信