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

I am testing a fresh install of Odoo 8.0 on Ubuntu 14.04 - all works OK apart from PDF report which are formatted incorrectly, missing graphics (sort of compressed text only), if switched to HTML reports works fine. WKHTMLTOPDF works fine in generating pdf from external pages. I am not sure how to debug this problem.


Anybody had a similar experience?

الصورة الرمزية
إهمال
أفضل إجابة

Chris, the problem is caused by your internal network setup. Its simply because Odoo cannot access your CSS and there for the graphics are not added and it takes longer to load the PDF. The solution however is very easy:

1. Go to settings > Technical > Parameters > System parameters
2. Make a new paramater

  • Name: web.base.url.freeze
  • Value: True

3. Edit the parameter web base.url and place the ip on http://0.0.0.0:8069
4. Refresh and everything is fixed.

You can read more about this in my original topic which is caused by the same problem as you: https://www.odoo.com/forum/help-1/question/why-does-my-odoo-wait-for-more-than-2-minutes-after-clicking-on-pay-now-ecommerce-63715

Note: if you ever want to use the mass mailing module you'll also need to add some patches and a second parameter, which you can find an answer for here: https://www.odoo.com/forum/help-1/question/mass-mailing-campaigns-do-not-track-opened-and-replied-e-mails-64705 or otherwise mass mailings won't work correct either.

الصورة الرمزية
إهمال
الكاتب

Thanks a lot - works like magic!

No problem! If my answer helped you please consider to accept / upvote it! It'll help others to find good working answers and it gives me some karma too. :)

Saved my day!! Thanks man!! :)

thank you .. the solution which you provide is really helpful. my issue is resolved by setting up the system parameters

أفضل إجابة

I was having a similar issue and the answer of Yenthe put me in the right path:

1. Go to Settings > Technical > Parameters > System parameters
2. Check the url and ports Values of all parameters.

My problem was in the web.base.url.report parameter that having the value http://0.0.0.0:8080 when my odoo instance run on port 8069. Changing that for the right port works like charm for me and the pdf render correctly.

I hope this help and solve your problem too.

 

الصورة الرمزية
إهمال
أفضل إجابة

Hello,

I've the same problem with odoo 9. This solution don't work for me.

Have you got a solution ?

i use debian jessie, odoo 9, wkhtmltopdf 12.1. I'm behind a reverse proxy.

Thanks for your help


الصورة الرمزية
إهمال

I have same problem PDF file is download but it have 0 byte and unable to open.

أفضل إجابة

Same issue in odoo 17. neither localhost nor 0.0.0.0 works.


edit: in my case it wasn't network issue, rather it was styling problem. the pdf engine has its limitations, compared to the html preview.

الصورة الرمزية
إهمال
أفضل إجابة

i had the same issue with v16 and i solved it with replacing the value of report.url to  http://localhost:8096/

الصورة الرمزية
إهمال
أفضل إجابة

I have just Edit the parameter web base.url and place the my localhost port on http://0.0.0.0:8089, Refresh  the page and its start working

الصورة الرمزية
إهمال
أفضل إجابة

Experiencing the same issue with odoo 9 on debian jessie using wkhtmltopdf 12.1 from http://nightly.odoo.com/extra/ (http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb)

Tried specifying report.url to with no luck unfortunately.

Please help

الصورة الرمزية
إهمال
أفضل إجابة

I have also encountered this issue. An image in a report appearing perfectly fine in my browser as html but not as a pdf. In my scenario it turned out to be internal vs external name resolution. Adding http://0.0.0.0:8069 to web.base.url did in fact get my default logo to appear which gave me a clue that I was experiencing a name resolution issue. Be sure that your odoo server can in fact resolve it's external url and find itself or wkhtmltopdf will have issues fetching resources beyond the html passed to it by odoo.

الصورة الرمزية
إهمال