[FIX] stock_picking_batch: Barcode not displayed in report_picking_batch

The barcode was never displayed in report_picking_batch.

opw:1910478

closes odoo/odoo#29103
This commit is contained in:
Goffin Simon
2018-11-28 14:52:51 +00:00
parent 38f00af5d1
commit c2e3d3a779
@@ -62,6 +62,9 @@
<th t-if="has_serial_number" width="15%">
<strong>Lot/Serial Number</strong>
</th>
<th t-if="has_barcode" width="15%" class="text-center">
<strong>Product Barcode</strong>
</th>
<th t-if="has_package" width="15%">
<strong>Package</strong>
</th>
@@ -95,6 +98,14 @@
<td t-if="has_serial_number and (move_operation.lot_id or move_operation.lot_name)" class="text-center h6" width="15%">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;humanreadable=1' % ('Code128', move_operation.lot_id.name, 600, 100)" style="width:100%;height:35px;" alt="Barcode"/>
</td>
<td width="15%" class="text-center" t-if="has_barcode">
<span t-if="move_operation.product_id and move_operation.product_id.barcode">
<img t-if="len(move_operation.product_id.barcode) == 13" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', move_operation.product_id.barcode, 600, 100)" style="width:100%;height:35px" alt="Barcode"/>
<img t-elif="len(move_operation.product_id.barcode) == 8" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN8', move_operation.product_id.barcode, 600, 100)" style="width:100%;height:35px" alt="Barcode"/>
<img t-else="" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', move_operation.product_id.barcode, 600, 100)" style="width:100%;height:35px" alt="Barcode"/>
</span>
</td>
<td t-if="has_package" width="15%">
<span t-field="move_operation.package_id"/>
<t t-if="move_operation.result_package_id">