Skip to Content
Menu
This question has been flagged
1 Reply
7000 Views

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

Avatar
Discard
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
Discard
Related Posts Replies Views Activity
2
Jul 24
1854
1
Aug 15
3403
2
Dec 21
23812
4
Oct 21
36828
1
Jul 21
3675