Skip to Content
Menu
This question has been flagged
1 Reply
1489 Views

view:stock.report_picking  ,Line 100

<td><span t-esc="ml_index+1"/></td>

  • The value is always 1.Warehouse print order number can not be automatically increased. why?

========================

<tbody>

                                    <t t-foreach="o.move_ids_without_package.sorted(key=lambda m: m.product_id.id)" t-as="move">

                                        <t t-foreach="move.move_line_ids.sorted(key=lambda ml: ml.location_id.id)" t-as="ml">

                                            <tr>

                                               <td><span t-esc="ml_index+1"/></td> 

                                                <td>

                                                    <

                                                    <span t-field="ml.product_id.name"/>

                                                    <span t-field="ml.product_id.description_picking"/>

                                                </td>

Avatar
Discard
Best Answer

Hi,

Try this code,

<t t-foreach="o.move_ids_without_package.sorted(key=lambda m: m.product_id.id)" t-as="move">
<t t-set="ml_index" t-value="0"/>
<t t-foreach="move.move_line_ids.sorted(key=lambda ml: ml.location_id.id)" t-as="ml">
<tr>
<td>
<t t-set="ml_index" t-value="ml_index + 1"/>
<span t-esc="ml_index"
/>
</td>
</tr>
</t>
</t>

Thanks

Avatar
Discard
Related Posts Replies Views Activity
2
Dec 23
12007
0
Oct 23
33
3
Oct 23
787
1
Oct 23
569
1
Aug 23
980