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 to set in Qweb Report, a minimum height to a table

By
Mayjonade
on 2/26/15, 9:47 AM 2,368 views

Hello,

In Qweb Report, I would like to set a minimum height to a table (for example 50% of the page).

Thanks

0
Mayjonade
On 2/26/15, 10:32 AM

@zbik

it's strange : it works with <table style="height:150mm;"> but not with <table class="table table-condensed table-hover border" style="height:150mm;">

Try CSS code : html, body { height: 100%; } table{ height:50%; position: absolute; top:25%; }

José DESGRIS
on 2/26/15, 11:07 AM

@José It doesn't work for me :Table appears on the top of the page . Could you try for example on the first table in sale.report_saleorder_document ? Thanks

Mayjonade
on 2/26/15, 11:45 AM

Answer updated

zbik
on 2/26/15, 1:20 PM

Answer updated

Mayjonade
on 2/27/15, 6:57 AM

not sure if this helps, but try: style="height:150mm !important;"

Shawn Varghese
on 2/27/15, 7:04 AM

and you test tbody tag

zbik
on 2/27/15, 7:31 AM

it still does not work. I'll be busy with something else for a few days. I will take this problem later. Thanks

Mayjonade
on 2/27/15, 9:05 AM

In my system works right in both cases

zbik
on 2/27/15, 11:45 AM

In fact, the problem occurs when I use "t-foreach" loop inside tbody tag

Mayjonade
on 3/4/15, 11:50 AM
0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 2/26/15, 10:19 AM

CSS styles works in Qweb

<div style="min-height:100mm;background-color:yellow;">

FOO FOO FOO FOO FOO

</div>

UPDATE:

When using tables, height essentially is min-height, as tables always stretch!

            <table style="height:100mm;background-color:yellow;">
            <tr><td>FOO FOO FOO</td></tr>
            <tr><td style="background-color:red;">FOO1 FOO1 FOO1</td></tr>
            </table>

 

 

 

@zbik Your new solution still set height to an element of table, not to the complete table

Mayjonade
on 2/27/15, 3:13 AM

height is set for complete table, not for element, you add new row with other background-color and test.

zbik
on 2/27/15, 4:37 AM

@zbik sorry, it doesn't work for me.

Mayjonade
on 2/27/15, 6:15 AM

Tested, in my system works without any problem in PDF and HTML reports.

zbik
on 2/27/15, 6:21 AM

PS. wkhtmltopdf -V .... wkhtmltopdf 0.12.1 (with patched qt)

zbik
on 2/27/15, 6:24 AM

same version for me. see my updated answer

Mayjonade
on 2/27/15, 6:57 AM

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: 2/26/15, 9:47 AM
Seen: 2368 times
Last updated: 3/16/15, 8:10 AM