I have fields on one2many tree view (check box which is boolean field and salesperson which is many2one). Now, I want to hide a field in one2many tree view based on a boolean field. when checkbox(which is in one2many field) is true then salesperson(field_name=salesman_id) field is hide(which is also in one2many field).
I used below code but not work.
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[1]/field[@name='order_line']/tree[1]/field[@name='price_unit']" position="after">
<field name="salesman_id" attrs="{'invisible':[('checkbox', '=', True)] }"/>
</xpath>
Please, Find the attachment. enter image description here How to do that. Thanks in advance.