Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
7849 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
лип. 24
2590
1
серп. 15
3797
2
груд. 21
24418
4
жовт. 21
37589
1
лип. 21
4175