Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
13764 Представления


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 

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мая 22
1993
2
дек. 19
3746
1
нояб. 22
7359
0
авг. 20
4582
4
авг. 20
9291