Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
289 Widoki

I'm trying to create new QWeb reports in Odoo 10 Community, but for some reason (locally speaking), when I download the PDFs and try to open them, they no longer open. The document keeps loading, but nothing opens. I've tried with several browsers and in incognito mode, but nothing works.

1: I've already added the report.url to the system parameters.

2: I've already added the web.base.url to the system parameters.

3: For version 10, I'm using the wkhtmltopdf 0.12.5 library (with QT patch).

4: I can open the other default reports (e.g., sales, invoices) without any problems, but I can no longer open the new reports in PDF format. However, I can see the structure if I change the format to HTML.

Any idea why this might be happening?

Thanks.

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,


The issue isn’t with Odoo parameters or your wkhtmltopdf installation but with the custom QWeb template HTML. While browsers can render the report in HTML, wkhtmltopdf is stricter and freezes if the template has invalid tags, unsupported CSS, or misses the standard report layout. Default reports work because they extend report.external_layout, which includes proper styles and fonts. To fix it, validate your template, base it on Odoo’s standard layouts, and test the raw HTML with wkhtmltopdf outside Odoo to identify what breaks PDF rendering.


For more information, refer to the following.

* https://www.cybrosys.com/blog/qweb-reports-in-odoo-v10

*https://www.odoo.com/documentation/saas-13/reference/reports.html


Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 24
8703
1
lis 17
6013
4
paź 17
26616
2
mar 24
2513
1
wrz 19
3841