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

{'All': [{'product': 'apple', 'stock_quant': 2, 'on_hand_quant': 2, 'sales_count': 0}]}

here i want to display "All" key from the above result

アバター
破棄
最善の回答

Hi,

Please try like below code.

< t t-set="all_vals" t-value="vals['All']" />
 < t t-foreach="all_vals" t-as="doc">
     < span t-esc="doc['product']"/>
     < br/>
     < span t-esc="doc['stock_quant']"/>
     < br/>
     < span t-esc="doc['on_hand_quant']"/>
     < br/>
     < span t-esc="doc['sales_count']"/>
 < /t>
Here consider vals as your dictionary.

Regards

アバター
破棄
関連投稿 返信 ビュー 活動
1
9月 24
2073
1
5月 23
2716
1
8月 23
3492
2
1月 23
11807
1
8月 22
3354