Skip to Content
Menu
This question has been flagged
1 Reply
4221 Views

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,


Avatar
Discard
Best Answer

Try it:

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

Avatar
Discard
Author

Thanks, it works!

Related Posts Replies Views Activity
4
May 23
9620
1
Jan 19
8758
0
Oct 17
2949
0
Nov 16
2338
0
Oct 16
4607