76 lines
4.2 KiB
XML
76 lines
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- 单个标签模板 -->
|
|
<template id="report_equipment_label_single2">
|
|
<t t-call="web.basic_layout">
|
|
<div class="page">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="equipment">
|
|
<div class="o_label_sheet" style="width:18mm;height:18mm;" >
|
|
<div class="o_label_full" style="width:18mm;height:18mm;">
|
|
<div class="text-start o_label_small_barcode" style="float:left;margin-top:2px;width: 17mm;height: 17mm">
|
|
<t t-if="equipment.h5_url">
|
|
<img t-att-src="image_data_uri(equipment.h5_url_qrcode)" width="60" height="60"
|
|
style="padding:0;margin:0;display:block"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
|
|
<!-- A4批量打印模板 -->
|
|
<template id="report_equipment_labels_a42">
|
|
<t t-call="web.basic_layout">
|
|
<div class="page">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="range(page_numbers)" t-as="page">
|
|
<div class="o_label_sheet">
|
|
<table class="my-0 table table-sm table-borderless">
|
|
<t t-set="x" t-value="0"/>
|
|
<t t-foreach="range(12)" t-as="row">
|
|
<tr>
|
|
<t t-foreach="range(4)" t-as="col">
|
|
<t t-if="len(equipment_list) > 0">
|
|
<t t-set="equipment" t-value="equipment_list.pop()"></t>
|
|
<td class="o_label_cell" style="padding:10px">
|
|
<div class="o_label_full o_label_small_text"
|
|
style="width:45mm;height:19mm;">
|
|
<div class="text-center "
|
|
style="float:left;width: 18mm;height: 18mm">
|
|
<t t-if="equipment.h5_url">
|
|
<img t-att-src="image_data_uri(equipment.h5_url_qrcode)"
|
|
width="50"
|
|
height="50"
|
|
style="padding:0;margin:0;display:block;width: 100%;height: 100%"/>
|
|
</t>
|
|
</div>
|
|
<div style="float:right; width:26mm;font-size:12px; ">
|
|
<div class="label-info" style="word-break: break-all">
|
|
设备: <t t-esc="equipment.name or 'N/A'"/>
|
|
</div>
|
|
<div class="label-info">
|
|
SN: <t t-esc="equipment.serial_no or 'N/A'"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<t t-set="x" t-value="x+1"/>
|
|
</t>
|
|
</t>
|
|
</tr>
|
|
</t>
|
|
</table>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
</odoo> |