How to Hide Fields in a Tree View


This code is used to hide fields in one2many(tree) in Odoo > 11

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

this type of code only works gives 'parent' in condition

For example: sale.order and sale.order.line, where sale.order has a field called field_name

to show/hide columns in sale.order.line tree view on sale.order form, use the parent.field_name domain on the sale.order.line tree field.

Visit my Udemy courses for more tricks:

http://udemy.com/user/akhmaddaniel


How to Hide Fields in a Tree View
vitraining, odoo indonesia
12 May, 2020
Share this post
Archive
Sign in to leave a comment
How to Unlock the Locked Sales Order?
without creating addon with Server Action