Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
6 ตอบกลับ
23057 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can use column_invisible inside attrs, like this

<field name="field_name" attrs="{'column_invisible': [('parent.field', '=', value)]}" />

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, 

one2many field  in tree  view  inside column hide(parent value)
    like:  attrs="{'column_invisible': [('parent.price_chk', '=', False)]}"

 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

คำตอบที่ดีที่สุด

Try 

<div attrs="{'invisible':[('price_chk', '=', False)]}">
     <field name="Price1"/>
</div>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง

no by using column_invisible in attrs we can make a many2one field invisible

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 19
8
3
เม.ย. 25
4669
5
พ.ย. 23
42977
Create dynamic tree view แก้ไขแล้ว
3
ก.ย. 23
9468
1
ก.ย. 22
3735