Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
7791 Näkymät

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

Avatar
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
heinäk. 24
2544
1
elok. 15
3774
2
jouluk. 21
24381
4
lokak. 21
37555
1
heinäk. 21
4108