Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
5000 Zobrazení

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

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
zář 24
1629
1
kvě 23
2339
1
srp 23
3153
2
led 23
11308
1
srp 22
2978