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

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
Hylkää
Paras vastaus

You can use column_invisible inside attrs, like this

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

Avatar
Hylkää
Paras vastaus

Hi, 

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

 

Avatar
Hylkää
Paras vastaus

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


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

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

Paras vastaus

Try 

<div attrs="{'invisible':[('price_chk', '=', False)]}">
     <field name="Price1"/>
</div>
Avatar
Hylkää
Paras vastaus

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
Hylkää

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
lokak. 19
8
3
huhtik. 25
4713
5
marrask. 23
43035
3
syysk. 23
9494
1
syysk. 22
3760