Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
7315 Vistas

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

Avatar
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 24
2083
1
ago 15
3522
2
dic 21
23947
4
oct 21
37034
1
jul 21
3861