跳至内容
菜单
此问题已终结
1 回复
301 查看

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.

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
5月 24
8732
1
11月 17
6024
4
10月 17
26632
2
3月 24
2525
1
9月 19
3848