Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
13307 Visualizzazioni


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


Avatar
Abbandona
Risposta migliore

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 

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mag 22
1643
2
dic 19
3296
1
nov 22
6679
0
ago 20
4102
4
ago 20
8860