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
7769 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
2535
1
srp 15
3762
2
pro 21
24370
4
říj 21
37527
1
čvc 21
4102