On 21/01/11 12:52 -0800, oscar_andres_col wrote:
> Hi, developers,
> 
> Why not in sale.py module set for example?:
> 
> _STATES_NOT = {'readonly': Not(Equal(Eval('state'), 'draft')),}
> 
> To change this:
> 
>     description = fields.Char('Description',
>             states={
>                 'readonly': Not(Equal(Eval('state'), 'draft')),
>             })
> 
> For this:
> 
>     description = fields.Char('Description', states= _STATES_NOT)

Personnaly, I don't like the idea of global variable because they will induce
wrong practice when extending/changing values from an other module.

> 
> 
> I think is a little most short, (maybe more pythonic ;) ) and  it will
> do possible reuse "_STATES_NOT"
> in other lines
> 
> 
> In tryton_stock ---> file: move.py
> 
> In line 7:
> 
>      from trytond.pyson import In, Eval, Not, In, Equal, If, Get, Bool
> 
> The class "In" is twice.

Fill an issue with/without patched.


Netiquette PS: don't use uppercase even in title, it is irritating.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgp9jxvu9FPw6.pgp
Description: PGP signature

Reply via email to