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

15 lines
1.1 KiB
XML

<data 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-if="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"/>
<div t-else="" t-field="move.product_id.barcode" t-options-quiet="0" t-options="{'widget': 'barcode', 'height': 100, 'img_style': 'width:100px; height:35px;'}"/>
</span>
<t t-set="product_barcode" t-value="move.product_id.barcode"/>
</t>
</td>
</xpath>
</data>