Files
Odoo-Build/snippets/stock.report_picking.replace_barcode.xml
T

19 lines
1.2 KiB
XML

<?xml version="1.0"?>
<data inherit_id="stock.report_picking" priority="50">
<xpath expr="//td[@id='barcode']" position="replace">
<td id="barcode" class="trimada" t-if="has_barcode">
<t t-if="product_barcode != move.product_id.barcode">
<span t-if="move.product_id and move.product_id.barcode">
<img t-if="len(move.product_id.barcode) == 13" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;quiet=%s' % ('EAN13', move.product_id.barcode, 290, 100, 0)" style="height:35px" alt="Barcode"/>
<img t-elif="len(move.product_id.barcode) == 8" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;quiet=%s' % ('EAN8', move.product_id.barcode, 290, 100, 0)" style="height:35px" alt="Barcode"/>
<img t-else="" t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s&amp;quiet=%s' % ('Code128', move.product_id.barcode, 290, 100, 0)" style="height:35px" alt="Barcode"/>
</span>
<t t-set="product_barcode" t-value="move.product_id.barcode"/>
</t>
</td>
</xpath>
</data>