Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
8103 Visualizzazioni

my function is defined in the website controller and I wish to call it from a model, e.g (res.partner) 

Avatar
Abbandona
Risposta migliore

You can do this by:

Importing the controller into the model and then you can call the function from the controller. for eg:

from odoo.addons.module_name.controllers.main import class_name_of_the_controller.
Thank you.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 24
2875
1
ago 15
4010
2
dic 21
24696
4
ott 21
37922
1
lug 21
4374