my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Pertanyaan ini telah diberikan tanda
1
Balas
9486
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!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
Get current model informations in the controller
Diselesaikan
|
|
2
Jul 24
|
4479 | |
|
How to add a line to website model in odoo?
Diselesaikan
|
|
1
Agu 15
|
5287 | |
|
|
2
Des 21
|
26275 | ||
|
Get model data in a controller
Diselesaikan
|
|
4
Okt 21
|
40431 | |
|
|
1
Jul 21
|
5749 |