Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
7990 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
2732
1
aug. 15
3912
2
dec. 21
24548
4
okt. 21
37761
1
jul. 21
4275