コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4543 ビュー

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,


アバター
破棄
最善の回答

Try it:

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

アバター
破棄
著作者

Thanks, it works!

関連投稿 返信 ビュー 活動
4
5月 23
10819
1
1月 19
9799
0
10月 17
3602
0
11月 16
2873
0
10月 16
5124