Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4552 Widoki

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,


Awatar
Odrzuć
Najlepsza odpowiedź

Try it:

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

Awatar
Odrzuć
Autor

Thanks, it works!

Powiązane posty Odpowiedzi Widoki Czynność
4
maj 23
10821
1
sty 19
9800
0
paź 17
3602
0
lis 16
2873
0
paź 16
5124