Re: [tryton-dev] get_singleton() vs. Config(1)

2015-05-18 Thread Cédric Krier
On 18 May 16:08, Udo Spallek wrote: Sat, 16 May 2015 20:39:38 +0200 Cédric Krier cedric.kr...@b2ck.com: On 16 May 14:20, Udo Spallek wrote: ... Is the use of ``get_singleton()`` recommended in module code or better stay with config = Config(1)? Obviously it is not the recommended way.

Re: [tryton-dev] get_singleton() vs. Config(1)

2015-05-18 Thread Udo Spallek
Sat, 16 May 2015 20:39:38 +0200 Cédric Krier cedric.kr...@b2ck.com: On 16 May 14:20, Udo Spallek wrote: ... Is the use of ``get_singleton()`` recommended in module code or better stay with config = Config(1)? Obviously it is not the recommended way. Indeed I don't see any advantage in using

Re: [tryton-dev] get_singleton() vs. Config(1)

2015-05-18 Thread Udo Spallek
Mon, 18 May 2015 16:21:29 +0200 Cédric Krier cedric.kr...@b2ck.com: On 18 May 16:08, Udo Spallek wrote: Sat, 16 May 2015 20:39:38 +0200 Cédric Krier cedric.kr...@b2ck.com: On 16 May 14:20, Udo Spallek wrote: ... Is the use of ``get_singleton()`` recommended in module code or better stay

Re: [tryton-dev] get_singleton() vs. Config(1)

2015-05-16 Thread Cédric Krier
On 16 May 20:39, Cédric Krier wrote: On 16 May 14:20, Udo Spallek wrote: Hi, in [1][2] we introduce a ``get_singleton()`` method for Singelton models. In the modules we always use a patter like this:: Config = pool.get('xxx.configuration') config = Config(1) or

[tryton-dev] get_singleton() vs. Config(1)

2015-05-16 Thread Udo Spallek
Hi, in [1][2] we introduce a ``get_singleton()`` method for Singelton models. In the modules we always use a patter like this:: Config = pool.get('xxx.configuration') config = Config(1) or Configuration = pool.get('xxx.configuration') config = Configuration(1) instead of::