跳至内容
菜单
此问题已终结
2 回复
3541 查看

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..

形象
丢弃
最佳答案

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

形象
丢弃
编写者

It is work correctly, Thank you Ravi Gadhia..

最佳答案

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

形象
丢弃