Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
17338 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 6 19
18053
0
thg 1 24
1584
0
thg 1 24
1265
3
thg 10 23
8798
1
thg 9 23
3322