跳至內容
選單
此問題已被標幟
1 回覆
3344 瀏覽次數

Hi.

Is it possible for a custom module to listen on a specific URL  (eg www.myodooserver.com/listentothis) for post requests (from another API)  or would this have to be done via nginx and another python script?

頭像
捨棄
最佳答案

Yes, you can do it by creating an http.Controller class, like:

from openerp import http

class Home(http.Controller):

@http.route('/listentothis', type='http', auth="none")

def index(self):

return "hello world"

Know more read here:

http://www.odoo.com/documentation/9.0/reference/http.html

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
9月 23
2068
0
9月 23
1814
2
6月 25
11294
6
10月 23
22139
3
3月 24
9558