Odoo Help

0

FIltering one2many with domain (distinct)

By
Pablo Gomez
on 9/12/13, 11:16 AM 2,319 views

Hi,

my one2many list shows many lines with 3 fields. I want to show the same list with not repeated lines.Is it possible?

EXAMPLE:

<field colspan="4" name="lineas" nolabel="1" widget="one2many_list">
                                <tree string="Lineas">
                                    <field name="prodlot_id"/>
                                    <field name="numero_ticket"/>
                                    <field name="numero_guia"/>
                                </tree>
                            </field>

11 2 3.

12 5 6.

11 2 3.

Should be:

11 2 3.

12 5 6.

Thank you so much!

0
Andreas Brueckl
On 9/13/13, 7:16 AM

Imho this is not possible with the domain functionality.

I also do not see any functional reason why this requirement would be useful (otherwise, can you give an example?).

What you can do: Create a function-field of type one2many where you filter out all duplicate records. You also have to define an fnct_inv method if the field should be writable.

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.

Register

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

0 follower(s)

Stats

Asked: 9/12/13, 11:16 AM
Seen: 2319 times
Last updated: 3/16/15, 8:10 AM