I created a custom invoice but now I am having trouble breaking the page when product lines are more than 30. I am trying to do this so it doesn't overlap with the total amount and payment terms (see image for the desired scenario)
Update code snippet: https://pastebin.com/WDr5uphK
I tried adding <div style="page-break-after: always;"/>
using foreach
but it breaks the whole table and moves to next page.
You can close the table, add the page break and open a new table
Example:
<t t-if="page_break == row_index">
</tbody>
</table>
<div style="dislay: block;page-break-after: always;"/>
<table class="table">
<tbody>
</t>