Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
7818 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
2566
1
aug. 15
3779
2
dec. 21
24392
4
okt. 21
37558
1
jul. 21
4147