my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
7315
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.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
2
jul 24
|
2083 | ||
|
1
ago 15
|
3522 | ||
|
2
dic 21
|
23947 | ||
Get model data in a controller
Resuelto
|
|
4
oct 21
|
37034 | |
|
1
jul 21
|
3861 |