تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
6 الردود
23049 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أكتوبر 19
8
3
أبريل 25
4668
5
نوفمبر 23
42972
3
سبتمبر 23
9467
1
سبتمبر 22
3733