İçereği Atla
Menü
Bu soru işaretlendi
6 Cevaplar
23091 Görünümler

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.

Avatar
Vazgeç
En İyi Yanıt

You can use column_invisible inside attrs, like this

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

Avatar
Vazgeç
En İyi Yanıt

Hi, 

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

 

Avatar
Vazgeç
En İyi Yanıt

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


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

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

En İyi Yanıt

Try 

<div attrs="{'invisible':[('price_chk', '=', False)]}">
     <field name="Price1"/>
</div>
Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Eki 19
8
3
Nis 25
4692
5
Kas 23
43011
3
Eyl 23
9484
1
Eyl 22
3752