Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
7663 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
2421
1
août 15
3668
2
déc. 21
24182
4
oct. 21
37374
1
juil. 21
4023