my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
Cette question a été signalée
1
Répondre
9494
Vues
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.
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
|
2
juil. 24
|
4485 | ||
|
|
1
août 15
|
5287 | ||
|
|
2
déc. 21
|
26277 | ||
|
|
4
oct. 21
|
40435 | ||
|
|
1
juil. 21
|
5759 |