my function is defined in the website controller and I wish to call it from a model, e.g (res.partner)
La domanda è stata contrassegnata
1
Rispondi
9508
Visualizzazioni
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.
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
|
2
lug 24
|
4495 | ||
|
|
1
ago 15
|
5290 | ||
|
|
2
dic 21
|
26280 | ||
|
Get model data in a controller
Risolto
|
|
4
ott 21
|
40452 | |
|
|
1
lug 21
|
5776 |