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

Does anyone know how to change the line-height of the contact widget lines in the pdf report?

I have tried every way including inline css style and external css style with no success.

Here's my code:

<div class="row" >

<div class="col-xs-6" style="border:1px solid black; padding-top:10px; line-height:12pt;">

<strong>To:</strong><br/>

<div  t-field="o.partner_id"

t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>

</div>

</div>

With the above code, the line-height only affect the first and second line, i.e., "To:" and "Company name". The address, phone, fax, ... has no effect.

I tried putting the following and tried other value for line-height, still no change whatsoever.

<div class="row" >

<div class="col-xs-6" style="border:1px solid black; padding-top:10px; line-height:12pt;">

<strong>To:</strong><br/>

<div style="line-height:12pt;" t-field="o.partner_id"

t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true, "phone_icons": true}'/>

</div>

</div>

if anyone has any success with changing the line spacing in the contact widget in pdf rendering, please kindly share your code with me. I have been trying for 2 days and it is really frustrating. Thanks.

Simon Lee

Avatar
Discard
Best Answer

<div class="row" style="line-height: 30pt">With the above code, the line-height only affect the first and second line, i.e., "To:" and "Company name". The address, phone, fax, ... has no effect.I tried putting the following and tried other value for line-height, still no change whatsoever.

</div>

Line-height is working for above div tag.

<div class="row">

<address style="line-height: 30pt" t-field="doc.passengrs_id" t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />

</div>


  1. address {

    1. margin-bottom: 20px;

    2. font-style: normal;

    3. line-height: 2;

    }

    You can change qweb report type as qweb-html.print a file name.Right click insert elemnet option. Go to click address tag. You can see a default seting code.You must create a external css file in your report



http://www.odoo.yenthevg.com/adding-static-resources-css-and-javascript-to-odoo/

Avatar
Discard
Best Answer

Open your report as html instead of pdf and determine the needed css that it's needed and make sure that it's get include it into the report

Avatar
Discard