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

Hello,

     I need to know that how to call function through URL?

頭像
捨棄
最佳答案

You can call a funtion from url using http.route

for example call a function from url www.domain.com/web/my/home

@http.route(['/my/home'], type='http', auth="public", website=True)
def your_function(self, **kw):
     # your code

or if you want to call a function defined inside a model use this inside your function

request.env['your.model'].function_name()


頭像
捨棄
作者

Thank You Mohammed

相關帖文 回覆 瀏覽次數 活動
7
9月 21
28283
3
9月 22
30657
2
12月 24
2106
1
2月 22
3926
1
2月 22
6809