Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
17353 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
giu 19
18065
0
gen 24
1587
0
gen 24
1266
3
ott 23
8802
1
set 23
3323