تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4958 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 24
1587
1
مايو 23
2294
1
أغسطس 23
3116
2
يناير 23
11274
1
أغسطس 22
2929