This question has been flagged
1 Reply
5190 Views

I have a one2many field named line_ids in my view:

i want to display some rows and not others but i need them all in a calculation.
the question is how to hide some rows in one2many

because i need all the rows for the calculation and i don't want to bother the user with all of the rows

I need to display just the rows with a field "display" value as True.

<!-- language: lang-xml -->

    <field name="line_ids"   >
        <tree string="Lignes de Rubriques" editable="bottom">
            <field name="category_id"/>
            <field name="code"   invisible="1"/>
            <field name="a_afficher" />
            <field name="sequence" />
            <field name="display" />
            <field name="total" invisible="1" />
            <field name="soumise_CNSS" string="CNSS"  invisible="1"/>
            <field name="soumise_AMO" string="AMO"  invisible="1"/>
            <field name="soumise_IR" string="IR" invisible="1"/>
        </tree>
    </field>

How do I achieve this? Thank you :)

Avatar
Discard

Got any solution for this?

Best Answer

You can use 2 One2Many. In one show filtered rows and in another one (hidden for user) keep all the rows

Avatar
Discard