Hello there,
Let me explain with an example.
In the sale order model, we have these two fields : note (text) and picking_ids (many2many)
In the form view of the sale order, I would want the field note readonly if all the associated pickings of the sale order are in "confirmed" state.
Actually, the note field is displayed like it in the sale order form view :
<field name="note" class="oe_inline"/>
How could I manage it?
EDIT #1
I would want something like that. But it doesn't work. :
<field name="note" class="oe_inline" attrs="{'readonly': [('picking_ids.state', '=', 'confirmed')]}" />