Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
7974 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
2718
1
aug. 15
3910
2
dec. 21
24547
4
oct. 21
37750
1
iul. 21
4261