Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
7780 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
2541
1
ago 15
3769
2
dic 21
24375
4
ott 21
37542
1
lug 21
4103