my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Se marcó esta pregunta
1
Responder
9487
Vistas
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.
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
|
2
jul 24
|
4479 | ||
|
|
1
ago 15
|
5287 | ||
|
|
2
dic 21
|
26275 | ||
|
Get model data in a controller
Resuelto
|
|
4
oct 21
|
40432 | |
|
|
1
jul 21
|
5749 |