Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
7789 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 24
2543
1
sie 15
3774
2
gru 21
24380
4
paź 21
37551
1
lip 21
4104