Odoo is an open source ERP application for business, formerly known as OpenERP. Its core is Python and using PostgreSQL for the database. It’s a web-based app, so that you can install it on a server capable machine. In this case, I talk about Raspberry Pi 2, installed Raspbian Jessie.
By following a brief tutorial from here, I was successfully getting Odoo running on Raspberry Pi 2. But it still had a little glitch: when I want to create PDF report, it threw error:
Wkhtmltopdf failed (error code: -6). Message: The switch –header-spacing, is not support using unpatched qt and will be ignored.The switch –header-html, is not support using unpatched qt, and will be ignored.The switch –footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display.
It was due to incompatible version of
wkhtmltopdf in Raspbian package repository. And Odoo needs a
wkhtmltopdf build with “patched qt”. For this, there has been a troubleshooting, i.e build
wkhtmltopdf along with Qt by yourself. Read it here
But, as I read the comments of the post, it would need a lot of time to compile. So, I found again another approach that likely more affordable. Then I finally came to a discussion on wkhtmltopdf’s Github repository and found out a person shared his compiled
wkhtmltopdf with unpatched Qt.
So, I downloaded it and replace the original binary of
wkhtmltopdf provided by Raspbian with it. Of course I have installed it with
sudo apt-get install wkhtmltopdf. Actually, I didn’t delete the original binary, but I just renamed it to
/usr/bin/wkhtmltopdf2 and then copied the downloaded one to
/usr/bin/wkhtmltopdf. And voila… problem solved. But perhaps you need to restart Apache or Nginx with php5-fpm, or even restart Pi.