Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
7480 มุมมอง

I am trying to create a paper format that is going to be printed in a thermal printer which has a paper roll, the problem is that in the model report.paperformat have to be defined the height, but in a paper roll that doesnt have sense, how can achieve to create a paper format that behaves like dynamic height depending in its content?.

I am defining the paperformat like this:

<record id="paperformat_invoice_ticket" model="report.paperformat">
<field name="name">Factura formato ticket</field>
<field name="default" eval="True" />
<field name="format">custom</field>
<field name="page_height">150</field>
<field name="page_width">80</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="dpi">90</field>
</record>


And the template is like this:


<template id="report_invoice_formato_ticket">
<t t-call="web.internal_layout">
<div class="page">
<!--code of template-->
</div>

</t>
</template>
อวตาร
ละทิ้ง

Good one keep it up

hi did you find the answer?

คำตอบที่ดีที่สุด

Try defining any paper format but without margins on top and bottom and put header and footer content in the body of the template for the report

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to send reports to printers in ODOO? แก้ไขแล้ว
2
ธ.ค. 19
4731
1
พ.ค. 19
10004
how to print barcode with odoo ? แก้ไขแล้ว
2
ก.ย. 18
9068
0
ก.ค. 18
2993
0
ก.พ. 22
2421