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

Hi , my problem is grouping my report value  from picking , with this condition (im using custom module to link invoice with stock picking ) 

Example :

In picking_ids field there are 2 value WH/001 and WH/002 , values come from SO1 (when i backordered the item by 2 order , they create 2 picking) 


What i want to know is , how to group by product with WH/00X as category :

Example :

WH/001

    -Item 1

    -Item 2

WH/002 

    -Item 1


inv.pp.xml

<tbody>
<!-- TODO Show field from model stock.picking-->
<!-- <tr t-foreach="o.invoice_line_ids" t-as="m"> -->
<!-- <tr t-foreach="o.picking_ids" t-as="l"> -->
<t t-set="product_category" t-value="[]"/>
<t t-foreach="request.env['stock.picking'].search([])" t-as="l">
<t t-set="product_category" t-value="product_category+[l.id]"/>
</t>

<t t-foreach="set(product_category)" t-as="category">

<div><strong t-esc="category.name"/></div>
<t t-foreach="o.picking_ids" t-as="n">
<t t-if="category.id==n.product_id.id">

<div><span t-field="n.product_id"/></div>

</t>
</t>
</t>



</tbody>



الصورة الرمزية
إهمال

Search Reporting Tips form here: https://plus.google.com/collection/oW1DWE

الكاتب

Thanks you :)

أفضل إجابة

I'm sorry I don't know why but I'm not permitted to post comments so I write this as an answer but actually not an answer... unfortunately google+ is no longer available now so the link Sehrish sent could not be opened. any suggestions, have you found out the way? How to do it in Odoo 12?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
نوفمبر 22
8375
2
ديسمبر 19
8504
0
نوفمبر 18
5021
1
أكتوبر 24
11457
3
سبتمبر 23
21044