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

odoo8 PDF print failed

By
Marek Matej
on 5/28/15, 8:13 AM 1,224 views

Hi folks,

trying to solve pdf print here. I have installed latest wkhtmltopdf-0.12.2.1 but still doesn't get the result.

In one case (printing invoice) it fail with following error.  In other case pdf is generated but has 0 length.

Traceback (most recent call last):
File "/home/openerp/projects/odoo8-production/odoo/addons/report/controllers/main.py", line 121, in report_downloadresponse = self.report_routes(reportname, docids=docids, converter='pdf')
File "/home/openerp/projects/odoo8-production/odoo/openerp/http.py", line 402, in response_wrap response = f(*args, **kw)
File "/home/openerp/projects/odoo8-production/odoo/addons/report/controllers/main.py", line 65, in report_routes pdf = report_obj.get_pdf(cr, uid, docids, reportname, data=options_data, context=context)
File "/home/openerp/projects/odoo8-production/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs)
File "/home/openerp/projects/odoo8-production/odoo/addons/report/models/report.py", line 198, in get_pdf save_in_attachment = self._check_attachment_use(cr, uid, ids, report)
File "/home/openerp/projects/odoo8-production/odoo/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs)
File "/home/openerp/projects/odoo8-production/odoo/addons/report/models/report.py", line 345, in _check_attachment_use pdf = base64.decodestring(pdf)

File "/home/openerp/python/2.7/lib/python2.7/base64.py", line 321, in decodestring return binascii.a2b_base64(s)
TypeError: must be string or buffer, not None

I think I'm missing some python module, but comparing to my other odoo server wher pdf print works I can't find the differences.

Can somebody give a hint what should I check and/or install?

Regards!

Downgrading to wkhtmltopdf-0.12.1.2 solved the error while printing invoices. Thanks!

Marek Matej
on 5/28/15, 10:17 AM
1

zbik

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


zbik
On 5/28/15, 9:43 AM

Try to install the recommended Odoo version wkhtmltopdf-0.12.1.



0
Severiano Belmonte
On 2/5/16, 7:17 AM

Hi Marek,

Delete the files atached to the invoice and try to print again.

It works for me.



0
Marek Matej
On 5/28/15, 11:13 AM

Zbik,

your proposal to downgrade solves the "error issue" however I'm still getting empty pdf with wkhtmltopdf-0.12.1.2

I removed all wkhtmltopdf version from portage (on gentoo) and switch to custom ebuild from this guy https://github.com/sormy/gentoo-overlay as I'm using on the other server with no problems.

With wkhtmltopdf-0.12.1 from Sormy's ebuild I'm able to print pdf, but it produces the error from my first post again... :(


Empty pdf affected wkhtmltopdf version (from portage):

$ wkhtmltopdf -V
wkhtmltopdf 0.12.1.2

Working wkhtmltopdf on other server installed (from Sormy's ebuild):

$ wkhtmltopdf -V
wkhtmltopdf 0.12.1 (with patched qt)


 Any ideas?


EDIT:

Well, it seems that only 2 invoices is affected by this issue. Other documents can be printed normally. Will create a new database to see if it helps.

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: 5/28/15, 8:13 AM
Seen: 1224 times
Last updated: 2/5/16, 7:17 AM