바코드가있는 보고서 템플릿 인이 예제는 qrcode를 사용하지만 필요에 맞게 변경할 수 있습니다. 다음과 같은 스타일을 추가 할 수도 있습니다.
<template id="report_label_style" inherit_id="website_report.layout">
<xpath expr="//style" position="after">
<style type="text/css">
.example_class {
display: block;
width: 228px;
height: 103px;
}
</style>
</xpath>
</template>
<template id="report_label">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<div class="page">
<div class="row">
<div class="example_class">
<t t-set="qr_src">/report/barcode/?type=QR&value=<t t-esc="o.qr_string" />&width=600&height=600</t>
<img t-att-src="'%s' % qr_src"/>
</div>
</div>
</div>
</t>
</t>
</template>
종이 서식 정의. 당신이 가면 당신은 paperformat 표시됩니다
여기
<report id="action_report_label"
model="model.name"
report_type="qweb-pdf"
name="module_name.report_label"
file="module_name.report_label"
string="Label" />
나는 연결 : 설정> 보고서> 종이 견적
<record id="paperformat_label_example" model="report.paperformat">
<field name="name">Paperformat Example</field>
<field name="default" eval="True"/>
<field name="format">custom</field>
<field name="page_height">23</field>
<field name="page_width">50</field>
<field name="orientation">Portrait</field>
<field name="margin_top">0</field>
<field name="margin_bottom">0</field>
<field name="margin_left">0</field>
<field name="margin_right">0</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">0</field>
<field name="dpi">80</field>
</record>
보고서 액션이 모델 ir_act_report_xml
에 필요한 레코드를 작성 보고서 서식 :
<record id="module_name.action_report_label" model="ir.actions.report.xml">
<field name="paperformat_id" ref="module_name.paperformat_label_example"/>
</record>
사용자 정의 용지 형식을 사용해야합니다. 설정> 보고서> 용지 형식 – ChesuCR
그리고 적절한 레이아웃을 사용해야합니다. 나중에 답변을 작성할 시간이 있다면 – ChesuCR