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)


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.

Atte,

Oscar Alvarez

-- 
[email protected] mailing list

Reply via email to