On 2015-06-15 06:48, Albert Cervera i Areny wrote: > 2015-06-13 21:46 GMT+02:00 oscar_alvarez <oscar.alvarez.mont...@gmail.com>: > > Hi, Devs > > > > Attibute colors works 3.4 with this code but not in 3.6 > > > > <tree string="Housekeeping" colors="If( > > Equal(Eval('state'), 'clean'), 'black', If( > > Equal(Eval('state'), 'dirty'), 'red', If( > > Equal(Eval('state'), 'inspected'), 'blue', 'green', > > ) > > ) > > )"> > > <field name="room"/> > > <field name="employee"/> > > > > trytond.exceptions.UserError: ('UserError', (u'Invalid XML for view ... > > > > I tried several ways I can't get works. > > XML attributes cannot be split into multiple lines.
And must be PYSON dumped. The easiest way is to use ModelView.view_attributes() http://doc.tryton.org/3.6/trytond/doc/ref/models/models.html?highlight=view_attribute#trytond.model.ModelView.view_attributes -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/