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

FIltering one2many with domain (distinct)

By
Pablo Gomez
on 9/12/13, 11:16 AM 1,833 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

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
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.

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

0 follower(s)

Stats

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