Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
13760 Lượt xem


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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 22
1989
2
thg 12 19
3746
1
thg 11 22
7358
0
thg 8 20
4579
4
thg 8 20
9288