Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
7360 Weergaven

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

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
jul. 24
2121
1
aug. 15
3542
2
dec. 21
23992
4
okt. 21
37064
1
jul. 21
3881