Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
7788 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
2542
1
ago. 15
3770
2
dez. 21
24380
4
out. 21
37549
1
jul. 21
4104