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:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
1
Reply
7939
Views
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!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
जुल॰ 24
|
2684 | ||
|
1
अग॰ 15
|
3878 | ||
|
2
दिस॰ 21
|
24530 | ||
|
4
अक्तू॰ 21
|
37709 | ||
|
1
जुल॰ 21
|
4223 |