Skip to Content
Menu
This question has been flagged
1 Odpoveď
7661 Zobrazenia

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

Avatar
Zrušiť
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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
júl 24
2418
1
aug 15
3668
2
dec 21
24182
4
okt 21
37373
1
júl 21
4023