I am working on 'stock.picking' there is a one2many field 'move_ids'. I need to add two more attributes in this field. But I need to show these two attributes in case of picking is returned. There is nothing in object to know if the picking is of return. neither in parent nor in child object.
So I made a selection field named 'type_return' with values 'return' and 'non_return' and two more fields ' attrib1' and 'attrib2' Now I need to show these fields in tree view* [ <tree editable="bottom"> ]* just in case of picking is returned. this I can know by value of 'type_return'.
I used: attrs="{'invisible':[('type_return', '!=', 'return')]}" .But it did not work for me.
Can someone help me, how to solve this issue?
what attrs="{'invisible':[('type_return', '!=', 'return')]}" it does is makes fields readonly when type is 'return' but doesn't make invisible from tree.