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
- Бухоблік
- Склад
- PoS
- Project
- MRP
Це запитання позначене
1
Відповісти
7849
Переглядів
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!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
2
лип. 24
|
2590 | ||
|
1
серп. 15
|
3797 | ||
|
2
груд. 21
|
24418 | ||
Get model data in a controller
Вирішено
|
|
4
жовт. 21
|
37589 | |
|
1
лип. 21
|
4175 |