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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
7809
Tampilan
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.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
Get current model informations in the controller
Diselesaikan
|
|
2
Jul 24
|
2560 | |
How to add a line to website model in odoo?
Diselesaikan
|
|
1
Agu 15
|
3779 | |
|
2
Des 21
|
24388 | ||
Get model data in a controller
Diselesaikan
|
|
4
Okt 21
|
37557 | |
|
1
Jul 21
|
4138 |