Skip to Content
Menú
This question has been flagged
1 Respondre
7326 Vistes

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

Avatar
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
2
de jul. 24
2088
1
d’ag. 15
3529
2
de des. 21
23949
4
d’oct. 21
37038
1
de jul. 21
3865