Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
7810 Visninger

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

Avatar
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
jul. 24
2560
1
aug. 15
3779
2
dec. 21
24388
4
okt. 21
37557
1
jul. 21
4139