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
7364 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
2124
1
sie 15
3543
2
gru 21
23994
4
paź 21
37076
1
lip 21
3885