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

Hi, I'm new with Odoo and i'm trying to play with some instances in a "general context", but i suspect that i can't do that.


I know that Odoo context is for an specific instance, and if i want to send some variable to another method, we send it by context. But I have a following case where Odoo's context don't solve my problem.


I'm trying to apply a singleton pattern. 


For instance, when we initialize some instance of external class (not Odoo models), it has a very heavy processing and i need to put the instance in some global context while Odoo's application is alive (executing), for when we need to use the same instance, we could recover it and use it without initialize again. How could I do that from Odoo?


Thanks!

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
tammik. 25
1166
3
syysk. 20
2952
2
jouluk. 15
4594
0
maalisk. 15
3278
2
maalisk. 15
6410