Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
7395 Vues

my function is defined in the website controller and I wish to call it from a model, e.g (res.partner) 

Avatar
Ignorer
Meilleure réponse

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.

Avatar
Ignorer
Publications associées Réponses Vues Activité
2
juil. 24
2127
1
août 15
3547
2
déc. 21
24010
4
oct. 21
37082
1
juil. 21
3891