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:
>
>  {
>     'invisible': ~Eval('context', {}).get('type','').in_(
>['in_invoice','in_credit_note']),
>  }
>
>But this fields are showin also on customer invoices.
>
>What I am doing anything wrong?
>
>Have anyone faced the same problem? There is some way to achieve what I
>want?
I don't think the act_window context is passed to the one2many.
Anyway, using context is probably a bad idea but instead use the
_parent_invoice.type or defines two different views.

Tested with this definition and it doesn't work also.

BTW i tested on the form view and it works correctly (with both definitions) but not on tree view.



--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Reply via email to