Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
6 Odpowiedzi
23100 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

You can use column_invisible inside attrs, like this

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

Awatar
Odrzuć
Najlepsza odpowiedź

Hi, 

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

 

Awatar
Odrzuć
Najlepsza odpowiedź

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


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

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

Najlepsza odpowiedź

Try 

<div attrs="{'invisible':[('price_chk', '=', False)]}">
     <field name="Price1"/>
</div>
Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

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

Powiązane posty Odpowiedzi Widoki Czynność
0
paź 19
8
3
kwi 25
4705
5
lis 23
43026
3
wrz 23
9487
1
wrz 22
3756