Print 4 barcodes per page, in a disposition that is practical to print on stickers.
45 lines
1.3 KiB
XML
45 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
<template id="report_location_barcode">
|
|
<style type="text/css">
|
|
.barcode {
|
|
position: absolute;
|
|
-webkit-transform: rotate(90deg);
|
|
width: 300px;
|
|
margin-left: -150px;
|
|
height: 50px;
|
|
margin-top: -25px;
|
|
}
|
|
.barcode:nth-child(1) {
|
|
top: 47mm;
|
|
left: 75%;
|
|
}
|
|
.barcode:nth-child(2) {
|
|
top: 161mm;
|
|
left: 75%;
|
|
}
|
|
.barcode:nth-child(3) {
|
|
top: 47mm;
|
|
left: 25%;
|
|
}
|
|
.barcode:nth-child(4) {
|
|
top: 161mm;
|
|
left: 25%;
|
|
}
|
|
</style>
|
|
<t t-call="report.html_container">
|
|
<t t-foreach="[docs[x:x+4] for x in xrange(0, len(docs), 4)]" t-as="page_docs">
|
|
<div class="page">
|
|
<t t-foreach="page_docs" t-as="o">
|
|
<t t-if="o.barcode"><t t-set="content" t-value="o.barcode"/></t>
|
|
<t t-if="not o.barcode"><t t-set="content" t-value="o.name"/></t>
|
|
<img class="barcode" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s&humanreadable=1' % ('Code128', content, 600, 100)"/>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</openerp>
|