Skip to Content
Menu
This question has been flagged
5 Replies
5885 Views

Hello,

I am running Odoo 10 on Centos 7.

My problem is that I'm not able to print anything. I receive a document with size of 0 kb and this error:

Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/controllers/main.py", line 96, in report_download    response = self.report_routes(reportname, docids=docids, converter='pdf')  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 504, in response_wrap    response = f(*args, **kw)  File "/usr/lib/python2.7/site-packages/odoo/addons/report/controllers/main.py", line 45, in report_routes    pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data)  File "/usr/lib/python2.7/site-packages/odoo/addons/report/models/report.py", line 192, in get_pdf    save_in_attachment = self._check_attachment_use(docids, report)  File "/usr/lib/python2.7/site-packages/odoo/addons/report/models/report.py", line 326, in _check_attachment_use    pdf = base64.decodestring(pdf)  File "/usr/lib64/python2.7/base64.py", line 321, in decodestring    return binascii.a2b_base64(s)TypeError: must be string or buffer, not None


Can you help ?

Avatar
Discard

can you print or save the reports?

Best Answer

I have the same problem.  Tried everything but nothing works on Odoo 10 / CentOS 7.

I can see odoo was able to get  wkhtml

2017-07-18 19:30:20,906 3145 INFO odoo odoo.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf 2017-07-18 19:30:21,109 3145 INFO odoo odoo.modules.loading: 47 modules loaded in 0.36s, 0 queries

However,  whenever I try to print invoice I get error like


Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/controllers/main.py", line 96, in report_download
    response = self.report_routes(reportname, docids=docids, converter='pdf')
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/controllers/main.py", line 45, in report_routes
    pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data)
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/models/report.py", line 192, in get_pdf
    save_in_attachment = self._check_attachment_use(docids, report)
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/models/report.py", line 326, in _check_attachment_use
    pdf = base64.decodestring(pdf)
  File "/usr/lib64/python2.7/base64.py", line 321, in decodestring
    return binascii.a2b_base64(s)
TypeError: must be string or buffer, not None
Avatar
Discard
Best Answer

Have you tried updating the "wkhtmltopdf" library which converts the HTML content to PDF?

You can try this: \https://webkul.com/blog/odoo-wkhtmltopdf-upgrade-version/

Just one correction in it: Use following link to download the library defined in point 1)

"sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb"

Avatar
Discard
Best Answer

same problem here. Any solutions? I'm afraid of trying the enterprise version due to this one.

Avatar
Discard
Best Answer

I have the same problem

Avatar
Discard