Odoo Help

Welcome!

This community 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.

0

Correct way to filter domain in xml view

By
Nehemias Herrera
on 4/24/15, 9:35 PM 1,469 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])]"/>

</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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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