تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
268 أدوات العرض

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
مايو 24
8684
1
نوفمبر 17
6006
4
أكتوبر 17
26605
2
مارس 24
2499
1
سبتمبر 19
3827