To modify the layout of an Odoo report, you will need to edit the corresponding QWeb template for that report. You can find the QWeb template for a report by going to the Reports menu, selecting the report you want to modify, and then clicking the Customize button. This will open the template editor, where you can make your desired changes to the layout of the report.
To add the total at the bottom of the last page, you can use the t-if and t-foreach tags to check if the current page is the last page, and then add the total below the table of lines.
Here is an example of how you could modify the template to achieve this:
''''''The code is already done""""
To limit the number of lines per page, you can use the t-set tag to set a variable that counts the number of lines on each page, and then use the t-if tag to check if the number of lines exceeds the maximum number of lines per page. If it does, you can use the t-call tag to call the pagebreak helper, which will insert a page break and start a new page.
Here is an example of how you could modify the template to achieve this:
"""""the code is already done""""