Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
7975 Visualizações

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

Avatar
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
jul. 24
2718
1
ago. 15
3910
2
dez. 21
24547
4
out. 21
37750
1
jul. 21
4261