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.

2

wkhtmltopdf report generation problem - report is generated incorrectly

By
devza
on 10/12/14, 10:30 AM 3,516 views

Hi all, I have a wierd problem. On my vps I've installed Odoo and on clear db with just a sale module report is generated correct. But when I've installed more addons, added some product, created website w/ shop etc. (normal using of odoo) the report ist genereted incorrectly. Here is an example:

http://pl.rghost.net/58485634

So it looks like wkhtmltopdf problem, but I've got 0.12.1 version and as I said on a new db report is generated correctly. Any ideas what might be wrong? Also on my local pc Odoo prints reports always correctly. So maybe it's problem with VPS?

I think you could add more information about your problem... I have some problem with report generation, but in my case I have some empty sale orders. I'm searching for a solution, if I find any useful information for you I'll post here.

Rui Andrada
on 10/12/14, 4:29 PM

Maybe it's help you: https://github.com/odoo/odoo/issues/364#issuecomment-47309589 https://www.odoo.com/forum/help-1/question/openerp-v8-wkhtmltopdf-0-12-0-error-bug-52041

Rui Andrada
on 10/12/14, 5:07 PM
4

Yenthe

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

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

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

Yenthe
On 10/13/14, 1:59 AM

This is a VPS/networking problem that I also had. Is your PDF delayed (taking more time then normal) and is your shop slow when clicking on pay now?
Your problem is coming from the Odoo itself. It cannot find the correct routing to its CSS resources etc and this causes a delay.
The problem is easy to fix..
Go to settings > Parameters > System parameters and edit your web.base.url to have the value http://0.0.0.0:8069/
Now create a new parameter with the name web.base.url.freeze and as value True.

Reload your whole Odoo and you will see the problem is fixed.

Great, it works now. Thank you. But if a delay is obvious, I wonder why the PDF file was corrupted? Anyway, thanks for help.

devza
on 10/13/14, 4:33 AM

No problem. The delay is caused because your Odoo serer is looking for the resources but can not find them. Because of not finding this CSS & resources you get a corrupted view, what really is a document with no styling to it. Please upvote or mark my answer as valid if this helped you. :)

Yenthe
on 10/13/14, 5:45 AM

It's sad but I have no karma to upvote your answer :(

devza
on 10/13/14, 5:49 AM

Now you do! The karma system is very annoying in the first posts. I've upvoted your question since I'm sure more people will run into this anyways. You should now be able to accept/upvote it.

Yenthe
on 10/13/14, 5:52 AM

Yup, so I did. I hope that your answer will help anyone who's facing same problem as mine.

devza
on 10/13/14, 5:55 AM
1
Robin Chatfield
On 7/30/15, 9:26 AM

Resurrecting this post because it was the first hit on google.

Yenthe's answer works, but it will break a lot of other features. A fix to this issue was added shortly after this question was asked. The correct solution to this problem is to add a parameter named report.url with the address that the report module should use (probably http://0.0.0.0:8069/).

Upvoted because this is absolutely true! I've lost track of this post otherwise I would've updated it. I won't edit my answer since you posted this though. Thanks for the heads up ;)

Yenthe
on 7/30/15, 9:31 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

3 follower(s)

Stats

Asked: 10/12/14, 10:30 AM
Seen: 3516 times
Last updated: 7/31/15, 2:37 PM