Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
8285 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
3107
1
ago. 15
4229
2
dez. 21
24925
4
out. 21
38230
1
jul. 21
4540