Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
8095 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
2869
1
ago 15
4002
2
dic 21
24690
4
oct 21
37909
1
jul 21
4367