Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7367 Представления

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
2125
1
авг. 15
3545
2
дек. 21
23998
4
окт. 21
37076
1
июл. 21
3889