On 13 Jan 13:59, marsupo...@gmail.com wrote:
> On Monday, January 13, 2014 1:41:34 AM UTC+1, Cédric Krier wrote:
> 
> > Don't use proteus. It was not design for such usage. 
> > I don't know bottle but I guess you could get some inspiration from: 
> >
> >     - Pyramid: https://code.google.com/p/tryton/wiki/TrytonPyramid 
> >     - Flask: https://code.google.com/p/tryton/wiki/TrytonFlask 
> >              https://code.google.com/p/flask-tryton/ 
> >
> 
> I tried the Flask example but it doesn't work out of the box failing on 
> line :
> 
> user = user_obj.browse(0)
> 
>  
> I see in the stack  trytond/model/modelstorage.py line 445 :
> 
> ids = map(int, ids)
> 
> 
> It seems that it's not means to deal with single ids. Is this a regression 
> or something ?
> 
> I guess the best behaviour would be to accept to work with single id, 
> returning single instance and also with list of ids and then returning list 
> of instances.
> 
> Do I miss something or am I forced to use  .browse([0]) ?
> 
> BTW I'm using trytond 3.01

The example is quite old probably base on 2.4.
Since 2.6, only list of ids is allowed and since 3.0, every class method
works only with a list of ids/instances.
It is not a regression but an improvement to prevent bugs.

By the way, if you are using Flask you should really try flask-tryton
instead.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgpNPHpJaszoc.pgp
Description: PGP signature

Reply via email to