Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Cédric Krier
On 2015-07-22 18:04, Sergi Almacellas Abellana wrote: > El 22/07/15 a les 17:49, Cédric Krier ha escrit: > >On 2015-07-22 13:25, Sergi Almacellas Abellana wrote: > >>>El 22/07/15 a les 12:53, Cédric Krier ha escrit: > >What do you mean by it doesn't work? > >Normally, if a field is invisi

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Sergi Almacellas Abellana
El 22/07/15 a les 17:49, Cédric Krier ha escrit: On 2015-07-22 13:25, Sergi Almacellas Abellana wrote: >El 22/07/15 a les 12:53, Cédric Krier ha escrit: > >What do you mean by it doesn't work? > >Normally, if a field is invisible on a list view, the cell will be > >empty. Do you see values inst

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Cédric Krier
On 2015-07-22 13:25, Sergi Almacellas Abellana wrote: > El 22/07/15 a les 12:53, Cédric Krier ha escrit: > >What do you mean by it doesn't work? > >Normally, if a field is invisible on a list view, the cell will be > >empty. Do you see values instead? > > No I don't see values, but I thought that'

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Sergi Almacellas Abellana
El 22/07/15 a les 12:53, Cédric Krier ha escrit: What do you mean by it doesn't work? Normally, if a field is invisible on a list view, the cell will be empty. Do you see values instead? No I don't see values, but I thought that's because it's a function field and the result will be always Non

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Cédric Krier
On 2015-07-22 12:37, Sergi Almacellas Abellana wrote: > El 22/07/15 a les 11:55, Cédric Krier ha escrit: > >On 2015-07-22 10:32, Sergi Almacellas Abellana wrote: > >>>Hi, > >>> > >>>I want to add some fields on invoice_lines_tree, that are only relevant for > >>>supplier invoices (and supplier cred

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Sergi Almacellas Abellana
El 22/07/15 a les 12:37, Jordi Esteve ha escrit: I use these states in account_invoice_purchase_relation module [1] that filters some purchase fields depending on the type of invoice: _STATES = { 'invisible': If(Bool(Eval('_parent_invoice')), ~Eval('_parent_invoice', {}).get('ty

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Jordi Esteve
On 22/07/15 10:32, Sergi Almacellas Abellana wrote: Hi, I want to add some fields on invoice_lines_tree, that are only relevant for supplier invoices (and supplier credit notes), so I added the following states on the field: { 'invisible': ~Eval('context', {}).get('type','').in_( ['in_i

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Sergi Almacellas Abellana
El 22/07/15 a les 11:55, Cédric Krier ha escrit: On 2015-07-22 10:32, Sergi Almacellas Abellana wrote: >Hi, > >I want to add some fields on invoice_lines_tree, that are only relevant for >supplier invoices (and supplier credit notes), so I added the following >states on the field: > > { > '

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Cédric Krier
On 2015-07-22 10:32, Sergi Almacellas Abellana wrote: > Hi, > > I want to add some fields on invoice_lines_tree, that are only relevant for > supplier invoices (and supplier credit notes), so I added the following > states on the field: > > { > 'invisible': ~Eval('context', {}).get('type',''

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Sergi Almacellas Abellana
El 22/07/15 a les 10:38, Jesús Martín Jiménez ha escrit: I want to add some fields on invoice_lines_tree, that are only relevant for supplier invoices (and supplier credit notes), so I added the following states on the field: { 'invisible': ~Eval('context', {}).get('t

Re: [tryton] Hide tree views fields depending on context

2015-07-22 Thread Jesús Martín Jiménez
Hi Sergi, 2015-07-22 10:32 GMT+02:00 Sergi Almacellas Abellana : > Hi, > > I want to add some fields on invoice_lines_tree, that are only relevant > for supplier invoices (and supplier credit notes), so I added the following > states on the field: > > { > 'invisible': ~Eval('context', {}).ge

[tryton] Hide tree views fields depending on context

2015-07-22 Thread Sergi Almacellas Abellana
Hi, I want to add some fields on invoice_lines_tree, that are only relevant for supplier invoices (and supplier credit notes), so I added the following states on the field: { 'invisible': ~Eval('context', {}).get('type','').in_( ['in_invoice','in_credit_note']), } But this fields are s