Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7781 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
iul. 24
2541
1
aug. 15
3769
2
dec. 21
24375
4
oct. 21
37542
1
iul. 21
4103