Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
7832 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
2575
1
aug. 15
3782
2
dec. 21
24394
4
okt. 21
37563
1
jul. 21
4156