Hello Community ,I'm facing a probleme ,i want to create an picking wich show the list of product sales grouped by gamme and product
i do this :
<tbody>
<t t-set="product" t-value="[]" />
<t t-foreach="o.move_lines" t-as="move">
<t t-set="product" t-value="product+[move.product_id.id]" />
</t>
<t t-set="product_gamme" t-value="[]" />
<t t-foreach="o.move_lines" t-as="move">
<t t-set="product_gamme" t-value="product_gamme+[move.product_id.product_gamme_id.id]"/>
</t>
<tr t-foreach="set(product)" t-as="prod" style="font-size: 11px;">
<t t-set="product_code" t-value="0" />
<t t-set="product_name" t-value="0" />
<t t-set="qty_gr" t-value="0" />
<t t-set="qty" t-value="0" />
<t t-set="total" t-value="0"/>
<t t-foreach="o.move_lines" t-as="move">
<t t-if="prod==move.product_id.id">
t t-set="product_code" t-value="move.product_id.code" />
<t t-set="product_name" t-value="move.product_id.name" />
<t t-if="move.gratuite">
<t t-set="qty_gr" t-value="qty_gr+round(move.product_uom_qty,2)" />
</t>
<t t-if="move.gratuite == False">
<t t-set="qty" t-value="qty+round(move.product_uom_qty,2)" />
</t>
<t t-set="total" t-value="qty_gr+qty" />
</t>
</t>
1- How to create Qweb reports in OpenErp: https://goo.gl/tg2Zyp
2- How to create custom reports in Odoo (Qweb): https://goo.gl/KZEo8X
Hope this will helps..