Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7005 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvc 24
1857
1
srp 15
3405
2
pro 21
23821
4
říj 21
36831
1
čvc 21
3678