mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2026-01-08 00:53:03 +02:00
53 lines
2.5 KiB
XML
53 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="report_simple_trackcode">
|
|
<center> <h2>
|
|
Tracking Code with Barcode</h2></center>
|
|
<div style="width: 32%; display: inline-table; height: 10rem;">
|
|
|
|
<table class="table table-bordered mb-0" style="border: 2px solid black;">
|
|
<tr>
|
|
|
|
<th class="table-active text-center" style="height: 4rem;">
|
|
<strong t-field="rec.name"/><br/>
|
|
<strong>Customer</strong>:<span t-field="rec.partner_id"/>
|
|
</th>
|
|
|
|
|
|
</tr>
|
|
<t t-foreach="rec.order_line" t-as="line">
|
|
<tr>
|
|
|
|
<!-- <td><span t-field="rec.partner_id"/></td> -->
|
|
<td class="text-center align-middle" style="height: 6rem;">
|
|
<t t-if="line.tracking_code">
|
|
<img alt="Barcode" t-if="len(line.tracking_code) == 13" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', quote_plus(product.barcode or ''), 600, 150)" style="width:100%;height:4rem;"/>
|
|
<img alt="Barcode" t-elif="len(line.tracking_code) == 8" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN8', quote_plus(line.tracking_code or ''), 600, 150)" style="width:100%;height:4rem;"/>
|
|
<img alt="Barcode" t-else="" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', quote_plus(line.tracking_code or ''), 600, 150)" style="width:100%;height:4rem"/>
|
|
<span t-field="line.tracking_code"/>
|
|
</t>
|
|
<t t-else=""><span class="text-muted">No barcode available</span></t>
|
|
</td>
|
|
|
|
</tr>
|
|
</t>
|
|
</table>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<template id="report_trackcode">
|
|
<t t-call="web.basic_layout">
|
|
<div class="page">
|
|
<t t-foreach="docs" t-as="rec">
|
|
<t t-call="laundary_mgt.report_simple_trackcode">
|
|
<t t-set="rec" t-value="rec"/>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</odoo>
|