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


Hello,

1)I want to call controller method of one custom module in another controller of second custom module.

Question:

I have two custom module in that created controllers. In First custom module controller contain method that method i want use in second custom module controller.

E.g: First custom module:

method:

def validate_token(func)

class : class APIController(http.Controller)

Second custom module:

method: def createcustomer(self,**kw):

class: class customer(http.Controller)

I want to use validate_token method in createcustomer method.

I know that how to create web controllers but I have no idea about how to call one controller method into other controller of other module


頭像
捨棄
最佳答案

Hi,

Try to follow the last section of the following blog which explain the use of one controller method in other

Web Controllers in Odoo

Regards 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
5月 22
1979
2
12月 19
3742
1
11月 22
7347
0
8月 20
4565
4
8月 20
9280