Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Problem with QWeb reports rendering to PDF, HTML version OK

By
Chris Z.
on 11/22/14, 8:34 PM 5,619 views

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?

3

Yenthe

--Yenthe--
6716
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 11/23/14, 9:17 AM

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!

Chris Z.
on 11/23/14, 10:49 AM

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. :)

Yenthe
on 11/23/14, 11:49 AM
0
Arsenty Karamurza
On 6/7/16, 8:54 AM

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

0
Phillip
On 5/12/16, 10:17 AM

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.

0
Eric CATTELIN
On 3/27/16, 7:09 AM

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.

Ubaid
on 8/17/16, 2:01 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 11/22/14, 8:34 PM
Seen: 5619 times
Last updated: 6/7/16, 8:54 AM