Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5014 มุมมอง

{'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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ย. 24
1646
1
พ.ค. 23
2349
1
ส.ค. 23
3167
2
ม.ค. 23
11375
1
ส.ค. 22
2995