Attrs on one2many field based on some parent field
<p>I had customised "stock.picking" and added two new fields in "stock.move" and "stock.pack.operation", while creating Sale Order I will pass value for that two field from it, but while creating purchase order I will not pass value for that field.</p>

<p>Picking made from purchase order I don't need that two field in "stock.move" and "stock.pack.operation" so I need to hide that.</p>

<p>I had tried some attrs on field but I can't get expected result.</p>

<p><img src="https://i.stack.imgur.com/7hTEy.png" alt="See Image for Ref"></p>

<p>There is a <code>purchase_id</code> field in my stock.picking, so I put attrs like:</p>

<pre><code>attrs="{'invisible': [('picking_id.purchase_id', '!=', False)]} 
</code></pre>

<p>or there is a <code>location_id</code> field in stock.pack.operation, for that I tried:</p>

<pre><code>attrs="{'invisible': [('location_id.usage', '!=', 'supplier')]} 
</code></pre>