Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
5517 Visualizações

{'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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
set. 24
2288
1
mai. 23
2933
1
ago. 23
3653
2
jan. 23
11986
1
ago. 22
3533