This question has been flagged
4 Replies
4625 Views

Printing a single report (sale order, delivery slip) works fine but if I select a few in a tree view I cannot print at once.

The resulting PDF is blank. Is Odoo able to do that out of the box?

Avatar
Discard
Best Answer

The problem was that the view report_minimal was an old version and there was a reference to unexisting js function. Updating the code (apt install odoo) does not refresh the views. I had to upgrade the web module manually and now the problem is gone.

Thank you Yenthe for responding!

Avatar
Discard
Best Answer

Hi Magen,

Yes, Odoo is able to print multiple reports at once after selecting them from the tree view out of the box. I've just double checked it and it works fine on the official Odoo instances (at runbot.odoo.com).
Are you sure that you're running the right Wkhtmltopdf version, 0.12.5, as suggested in the wiki at https://github.com/odoo/odoo/wiki/Wkhtmltopdf#version-status ? Did you update your Odoo to the latest source code?

Regards,
Yenthe

Avatar
Discard
Author

I upgraded to 0.12.5 with same results. Upgraded odoo - no difference.

I see that in ir_actions_report.py line 416 passes the arguments to wkhtmltopdf

it generates 1 header html, 1 footer html and x bodies (according to the selected records) Buth then wkhtmltopdf generates only one page pdf.

I tried playing with the arguments ignoring header or footer but same results - only 1 page pdf generated

Author

it is the <script type="text/javascript" src="http://127.0.0.1/web/content/15320-fb21d4c/web.report_assets_common.js"></script> inside the body of the report that causes the problem

Without it works fine. Even if it is an empty file it doesn't work unless I remove the script from the html before passing it on to wkhtmltopdf

This file is being dynamically generated from several js scripts added to web.report_assets_common