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

Dear all,

Using standard html code and write an html file to test a table, I get the following result:


The above image represents a table with 2 rows and 2 columns.

Using the same exact code on Odoo report template, I get this result:


What could be the problem?

How can I reduce the distance between the cells in Odoo and achieve the same result as the first image? Tried to play with cellpadding, cellspacing, border and nothing seems to work... in fact, even increasing this values to very high numbers the result is always the same...

The sample code I use:

<table style="text-align: left; width: 720px;" border="0" cellpadding="0" cellspacing="0" padding="0" margin="0">
    <tbody>
    <tr >
        <td style="vertical-align: top; width: 168px;">Value 1</td>
        <td style="vertical-align: top; width: 546px;">field value 1</td>
    </tr>
    <tr >
        <td style="vertical-align: top; width: 168px;">Value 2</td>
        <td style="vertical-align: top; width: 546px;">field value 2</td>
    </tr>
    </tbody>
</table>

Thank you in advance

Best regards

Paulo

Avatar
Discard
Author Best Answer

Thank you Meaningless Life.

It did not helped but the link is very usefull. Thank you once again.

After "fighting" for hours with this issue (from my side), I have finnally discovered what was the problem (once again from my side).

On the report template I was using:

<t t-call ="web.external_layout">

Changed it to:

<t t-call ="web.basic_layout">

I am affraid it is related to the "layout" itself, but cannot confirm because I lack of knowledge on developing qweb reports. This is my first one.

I really need a "step-by-step" guide on how to build reports on Odoo...

Thank you once again

Regards

Paulo


Avatar
Discard
Best Answer

Try something like

<table style="text-align: left; width: 720px; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" padding="0" margin="0">

(Haven't checked for working)

see https://stackoverflow.com/questions/18880947/reduce-vertical-space-between-2-rows-in-a-table-html

Avatar
Discard
Related Posts Replies Views Activity
3
Jun 19
15950
0
Jan 24
419
0
Jan 24
245
3
Oct 23
5984
1
Sep 23
1973