Odoo Help

0

How to hide one2many's field column in tree view based on parent field value

By
Ayyappan
on 9/30/16, 1:27 AM 1,101 views

I have created a new field in sale order line named as "Price1" and "Price_chk" boolean field in Sale order. The field "Price1" should be invisible in tree view when the field "Price_chk" is False and it should be visible when the field "Price_chk" is True.

0
Chandran N Nepolean
On 6/2/17, 5:37 AM

Hi ayyapan,

one2many list view (column hiding will not work). We can hide only content of column not whole column. so only way to hide is you have to set group permission.


Thanks

Chandran Nepolean

0
Shameem Babu @ iWesabe
On 9/30/16, 11:56 PM

Try 

<div attrs="{'invisible':[('price_chk', '=', False)]}">
     <field name="Price1"/>
</div>
0
Juan
On 9/30/16, 4:08 AM

You can do it with attrs and invisible in the xml.


<field name="Price1" attrs="{'invisible':[('price_chk', '=', False)]}" />

I tried this, but it was not working. Because "attrs" is not working in one2many treeview

Ayyappan
on 9/30/16, 5:45 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 9/30/16, 1:27 AM
Seen: 1101 times
Last updated: 6/2/17, 5:37 AM