[FIX] product: Print "Products Labels"
The number of characters must be taken into account to print the
barcode. With 13 characters -> EAN13, with 8 characters -> EAN8 else
-> Code128
Backport of 12b11c1e6f
opw:1849965
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
<tbody>
|
||||
<tr style="width: 1in;">
|
||||
<td style="border: 2px solid black;text-align: center; vertical-align: middle;" class="col-xs-5">
|
||||
<img t-if="product.barcode" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
|
||||
<img t-if="product.barcode and len(product.barcode) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
|
||||
<img t-elif="product.barcode and len(product.barcode) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN8', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
|
||||
<img t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', product.barcode, 600, 150)" style="width:100%;height:20%;"/>
|
||||
<span t-field="product.barcode"/>
|
||||
</td>
|
||||
<td style="border: 2px solid black; text-align: center;" class="col-xs-7">
|
||||
|
||||
Reference in New Issue
Block a user