Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
17357 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
čvn 19
18066
0
led 24
1588
0
led 24
1270
3
říj 23
8805
1
zář 23
3324