Skip to Content
Menu
This question has been flagged
2 Replies
8484 Views

Hello,

I'm trying to create a report similar to the "Labels" from res.partner but with exact sizes, I have well width but height size is impsible. I put a height of 68mm to div, but the print is 58mm. Any ideas?

page_partners is a list of lists with 8 res.partner recordset.

<template id="report_res_partner">

<t t-call="report.html_container">

<t t-foreach="partners" t-as="page_partners">

<div class="page">

<div style="min-width:194mm; min-height: 272mm; border: 1px solid red">

<div style="float: left; min-width: 50%; min-height: 68mm; border: 1px solid black" t-foreach="page_partners" t-as="partner">

<p t-field="partner.name"/>

<t t-if="partner.parent_id.name">

<p t-field="partner.parent_id.name"/>

</t>

<p t-field="partner.street"/>

<p t-field="partner.street2"/>

<span t-field="partner.zip"/>

<span t-field="partner.city"/>

<p t-field="partner.country_id.name"/>

</div>

</div>

</div>

</t>

</t>

</template>

Avatar
Discard
Best Answer

You have to set your dpi of your paper format in multiple of 96.

Avatar
Discard
Best Answer

you need to generate the pdf to make sure the result is the same each times you print a report.

you need to check the dpi of the report "paper format" which is use to generate the report. the 100dpi and 400dpi are different result.

I set 240dpi for my report, and it is still not generate correct size in mm, but it is acceptable.

regards

Avatar
Discard
Related Posts Replies Views Activity
3
Mar 24
18946
2
Jan 24
15043
0
Nov 15
3830
0
Oct 24
118
1
Apr 24
972