Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
3557 Näkymät

How to hide the one2many sub field based on above field.

For example: i want to hide sale order line discount field field if the payment_term field have some specific value..

Avatar
Hylkää
Paras vastaus

you can use attrs `column_invisible`in tree/list view of one2many field
​e.g. 
<field name="discount" attrs="{'column_invisible': [('parent.state','=', 'done')]}"/>

Avatar
Hylkää
Tekijä

It is work correctly, Thank you Ravi Gadhia..

Paras vastaus

In onchange of payment_term check your condition and make the discount field invisible=True

Avatar
Hylkää