This question has been flagged

I want to filter the domain of a o2m field in my model (let's calle it field1_ids) based on a m2m field (let's call it field2_ids) also in the same model, when in my view, I am filtering this way:



<field name="field1" widget="one2many">

<tree editable="bottom">

<field name='another_field' />

<field name='field_name_in_another_model' domain="[('id','=',parent.field_2[0][2])]"/>

</tree>

</field>


it does work, but I am wondering if this is the right way to acces the current record and stored values in the field I need, thanks in avance

Avatar
Discard