Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
5912 Näkymät

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
Hylkää

Got any solution for this?

Paras vastaus

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

Avatar
Hylkää