Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
7368 Prikazi

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

Avatar
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
jul. 24
2125
1
avg. 15
3545
2
dec. 21
23998
4
okt. 21
37076
1
jul. 21
3889