Skip to Content
Menu
This question has been flagged
5 Replies
3751 Views

Hi,
I am trying to create a template for the Qweb report. What I want to know is, if a div contains more data that cannot be included in a single page, Odoo breaks the extra content to the next page. I just want to move all the data to the next page if a div contains more data. Simply, I should get data in a div within a single page. Is there any way to achieve this?
Regards

Avatar
Discard
Best Answer

Hi,
You can simply achieve this by adding a style attribute in your div like below.

<div style="page-breake-inside: avoid">
<!--Your contents-->
</div>

It prevents the page to display a div partially in more than one pages if it contains more data.

Regards

Avatar
Discard
Best Answer

Try this it will help you

<div style="position:absolute;top:850px; page-break-inside: avoid;">
     Your Custom Content
</div>

Thanks.

Avatar
Discard

Nice Tip.

Author Best Answer

Thanks all

Avatar
Discard
Best Answer

It's helpful for you. 

Avatar
Discard