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
- Contabilitate
- Inventar
- PoS
- Project
- MRP
Această întrebare a fost marcată
1
Răspunde
7781
Vizualizări
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Înscrie-teRelated Posts | Răspunsuri | Vizualizări | Activitate | |
---|---|---|---|---|
|
2
iul. 24
|
2541 | ||
|
1
aug. 15
|
3769 | ||
|
2
dec. 21
|
24375 | ||
Get model data in a controller
Rezolvat
|
|
4
oct. 21
|
37542 | |
|
1
iul. 21
|
4103 |