Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
21 Trả lời
22987 Lượt xem

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!

 

 

Ảnh đại diện
Huỷ bỏ

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

wkhtmltopdf version?

Tác giả

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

Tác giả

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

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

Tác giả

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?

problem with access to javascript, one js flile?

Tác giả

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

chown -R odoo.odoo ADDONS_DIR

You have customized js or css?

Tác giả

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?

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 :(

PS. you test other browser

PS1 ... and enable debugger in browser

Tác giả

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

Tác giả

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

Câu trả lời hay nhất

I'm having the same issue with the PDF reports being blank, but only seems to be with the Odoo 10 Community.  I install Odoo 10 Enterprise, load sample data, same everything as community, and it prints a PDF with data.  

Run both from the same laptop.  Even run Ent but connect back to community database, and reports are populated.  Windows 7 enterprise laptop.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả

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)?

Câu trả lời hay nhất

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

Hope this help.

 

Ảnh đại diện
Huỷ bỏ