Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4549 Vizualizări

I'm trying to show the report lines orderred by two values, maturity_date and amount, how can i achieve it.

i'm doing

<tr t-foreach="o.line_ids.sorted(key=lambda b: b.ml_maturity_date )" t-as="line">

to order by maturity_date,

how can i add amount so it gets ordered first by maturity_date and those result also for amount.

Kind regards,


Imagine profil
Abandonează
Cel mai bun răspuns

Try it:

<tr t-foreach="o.line_ids.sorted(key=lambda b: (b.ml_maturity_date, b.another_param))" t-as="line">

Imagine profil
Abandonează
Autor

Thanks, it works!

Related Posts Răspunsuri Vizualizări Activitate
4
mai 23
10819
1
ian. 19
9799
0
oct. 17
3602
0
nov. 16
2873
0
oct. 16
5124