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

Print .pdf result in empty page

By
Neil
on 1/31/15, 7:22 AM 4,176 views

Hi,

I'm running Odoo v8, and recently ran into some troubles with printing orders/invoices/packing slips/what more have you. Two months back I've modified the external headers/footers to display our logo's, and it has been printing correctly until yesterday. The .pdf files printed do not display any content whatsoever.

As said, I've modified the external header/footer in Settings -> User Interface -> Views -> external_layout_header and external_layout_footer. If I remove or rename the div class="header"/"footer" respectively, I can print pdf's again, however without the content of the header/footer.

Server log doesn't show any wkhtmltopdf errors, and as said, everything has been working until yesterday and since then no apperent changes have been made.

Would like some help to isolate/resolve this issue. Thanks!

 

 

What is the effect if you change Report Type = HTML in Settings/Reports/Reports?

zbik
on 1/31/15, 8:10 AM

wkhtmltopdf version?

zbik
on 1/31/15, 8:11 AM

wkhtmltopdf --version wkhtmltopdf 0.12.1 (with patched qt) Setting report type to HTML prints the entire report. There are some formatting f*ck ups however, but everything is there...

Neil
on 1/31/15, 8:19 AM

I tried putting back a back-up of the entire server. The back-up allows me to print the invoices again correctly, but if I make modifications to the settings and log-in/log-out the whole hassle starts again...

Neil
on 2/1/15, 11:38 AM

Try original footer and header, probably issue in your code.

zbik
on 2/1/15, 11:45 AM

Thought that would solve it as well, so replaced it with the originals I grabbed from https://github.com/odoo/odoo/blob/b74d830eb299c6d672c58f3b53410dde37608a5f/addons/report/views/layouts.xml Rebooted, logged-out and logged-in and still marvelous blank pages :-( Apart from being blank, it still shows a file size of about 4kB?

Neil
on 2/1/15, 11:54 AM

problem with access to javascript, one js flile?

zbik
on 2/1/15, 12:07 PM

Not that I'm aware of, how can I check?

Neil
on 2/1/15, 12:27 PM

chown -R odoo.odoo ADDONS_DIR

zbik
on 2/1/15, 12:39 PM

You have customized js or css?

zbik
on 2/1/15, 12:41 PM

I chowned /opt/odoo/addons and rebooted with no results. I had edited the css of the website module a while back. Would it be worth trying uninstalling the website builder, and re-install it with a fresh version from github?

Neil
on 2/1/15, 1:03 PM

I think not, this module should not be linked to invoices. Can compare versions and so look for the cause, step by step? I can not help you more :(

zbik
on 2/1/15, 1:27 PM

PS. you test other browser

zbik
on 2/1/15, 1:33 PM

PS1 ... and enable debugger in browser

zbik
on 2/1/15, 1:50 PM

Thanks for your help. I removed the website modules and it didn't do a thing. I also tried different browsers with the debugger enabled, all show normal calls to wkhtmltopdf with a 200 OK response. I guess I'm going to re-install the entire thing tomorrow, there's something weird going on here...

Neil
on 2/1/15, 2:21 PM

I think I managed to resolve it. Iptables was reconfigured to reroute port 80 to 8069. Therefore the interface was accessed on port 80, which seems to have caused the problem. Changed back to old-spool port 8069, and it prints again...

Neil
on 2/2/15, 10:26 AM
0
Neil
On 1/31/15, 9:05 AM

Tried with the latest version (0.12.2.1) with:

sudo wget http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb

Rebooted and loged out/in on the Odoo interface. Still I'm faced with it printing empty pages.

(@zbik, sorry, couldn't comment on your answer, the forum doesn't allow me to because I need 30pts.)

You disable/enable Custom Footer in Company Form and verify result? You verify also how many server instances is working.

zbik
on 1/31/15, 2:07 PM

Disable/enabling the custom footer yields no results. There's just one instance running on the server, and it has only one database. Is there any way to debug the wkhtmltopdf process (is there a separate log file)?

Neil
on 1/31/15, 5:00 PM
0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 1/31/15, 8:47 AM

Probably problem with wkhtmltopdf. To solve wkhtmltopdf issue (report are empty) try this:

Hope this help.

 

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

1 follower(s)

Stats

Asked: 1/31/15, 7:22 AM
Seen: 4176 times
Last updated: 3/16/15, 8:10 AM