Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
5158 Prikazi

{'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
Opusti
Best Answer

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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
sep. 24
1811
1
maj 23
2500
1
avg. 23
3299
2
jan. 23
11597
1
avg. 22
3169