Skip to content
Snippets Groups Projects
Commit 65bad81b authored by Nicolas Martinelli's avatar Nicolas Martinelli Committed by Nicolas Martinelli
Browse files

[FIX] stock: Delivery Slip

- Create a picking to deliver 10 units, save
- Edit and change to 12 units
- Print the Delivery Slip => the qty is 10
- Validate the picking with 12 units
- Print the Delivery Slip => the qty is still 10

The use of `ordered_qty` is misleading, since it corresponds to the qty
ordered at creation.

Backport of 0a2999cd

opw-1825396
parent b200f020
Branches
Tags
No related merge requests found
......@@ -53,20 +53,19 @@
<thead>
<tr>
<th><strong>Product</strong></th>
<th><strong>Ordered Quantity</strong></th>
<th><strong>Quantity</strong></th>
</tr>
</thead>
<tbody>
<tr t-foreach="o.move_lines" t-as="move">
<td><span t-field="move.product_id"/></td>
<td>
<span t-field="move.ordered_qty"/>
<span t-field="move.product_uom_qty"/>
<span t-field="move.product_uom"/>
</td>
</tr>
</tbody>
</table>
<t t-set="backorder" t-value="False"/>
<table class="table table-condensed mt48" t-if="o.pack_operation_ids">
<t t-set="has_serial_number" t-value="o.pack_operation_ids.filtered('pack_lot_ids')" groups="stock.group_production_lot"/>
<thead>
......@@ -75,10 +74,7 @@
<th name="lot_serial" t-if="has_serial_number">
<span class="pull-left">Lot/Serial Number</span>
</th>
<th class="text-center"><strong>Ordered Quantity</strong></th>
<th t-if="any([pack_operation.state == 'done' for pack_operation in o.pack_operation_ids])" class="text-right">
<strong>Delivered Quantity</strong>
</th>
<th class="text-center"><strong>Quantity</strong></th>
</tr>
</thead>
<tbody>
......@@ -110,18 +106,6 @@
<td class="text-center">
<span t-if="pack_operation.package_id">:</span>
<span t-field="pack_operation.package_id"/>
<span t-field="pack_operation.ordered_qty"/>
<t t-if="pack_operation.linked_move_operation_ids">
<span t-field="pack_operation.linked_move_operation_ids[0].move_id.product_uom"></span>
</t>
<t t-else="1">
<span t-field="pack_operation.product_uom_id"></span>
</t>
</td>
<td class="text-right" t-if="pack_operation.state == 'done'">
<t t-if="pack_operation.ordered_qty != pack_operation.qty_done_uom_ordered">
<t t-set="backorder" t-value="True"/>
</t>
<span t-field="pack_operation.qty_done_uom_ordered"/>
<t t-if="pack_operation.linked_move_operation_ids">
<span t-field="pack_operation.linked_move_operation_ids[0].move_id.product_uom"></span>
......@@ -137,7 +121,7 @@
This shipment is a backorder of <t t-esc="o.backorder_id.name"/>.
</p>
<p>
<t t-if="backorder">
<t t-if="o.search([('backorder_id', '=', o.id), ('state', 'not in', ['cancel', 'done'])])">
All items couldn't be shipped, the remaining ones will be shipped as soon as they become available.
</t>
</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment