Odoo Help


Correct way to filter domain in xml view

Nehemias Herrera
on 4/24/15, 9:35 PM 2,124 views

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])]"/>



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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/24/15, 9:35 PM
Seen: 2124 times
Last updated: 4/24/15, 9:35 PM