跳至內容
選單
此問題已被標幟
1 回覆
7150 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
12月 19
4462
1
5月 19
9642
2
9月 18
8833
0
7月 18
2803
0
2月 22
2202