Skip to Content
Menú
This question has been flagged
1 Respondre
5334 Vistes

{'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
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
1
de set. 24
2096
1
de maig 23
2730
1
d’ag. 23
3496
2
de gen. 23
11820
1
d’ag. 22
3359