Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I reduce the line-height in the contact widget content in my report (odoo 9)

By
Simon Lee
on 7/10/16, 7:49 AM 310 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

0
kirubanidhi
On 7/11/16, 2:55 AM

<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/

ahaan..

Annadurai
on 9/28/16, 2:35 AM
0

Axel Mendoza

--Axel Mendoza--
10203
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 7/11/16, 1:48 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/10/16, 7:49 AM
Seen: 310 times
Last updated: 7/11/16, 2:55 AM