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.

1

wkhtmltopdf (0.12.2.1) PDF Reports are not correctly formatted on Ubuntu:

By
Nigel Butler
on 7/7/15, 6:17 AM 5,854 views

Having installed Odoo 8.0 on Ubuntu server 14.04.2 and installing the latest wkhtmltopdf (0.12.2.1) when I generate any PDF the font is too large and the format for the report is not correct.

The preview in Edit Company Data > Report Configuration > Preview Header / Footer, looks great. See this JPEG [https://www.dropbox.com/s/p25lolvjv35vwi8/Header-Preview.JPG?dl=0]

Any PDF report that is generated the company name, and all address details are all going onto multiple lines, which then covers the customers address. For example the Picking List, see this JPEG [https://www.dropbox.com/s/jw59rz4f1yca8jo/Picking-List.JPG?dl=0]


When I open the same Database on a Windows installation of Odoo Version 8.0-20150629 the reports all look great, but in Ubuntu they cannot be used. 

I have tried changing the font in Edit Company Data > Report Configuration >  and also reducing the font size in the header data Edit Company Data > Report Configuration > RML Header, but this does not help.

When I change the report output to HTML Settings > Reports > Report Type, the HTML File is correctly formatted, just not the PDF.

Does any one know what the issue is and how it can be resolved on the Ubuntu Server?

After installing wkhtmltopdf I wrote the path in odoo config file : webkit_path = /usr/local/bin/wkhtmltopdf I don't know if can help you !

Guillaume Seran
on 7/7/15, 6:26 AM

Guillaume, I have just tried adding"webkit_path = /usr/local/bin/wkhtmltopd" to /etc/odoo-server.conf and then restarting the server but it does not seem to have solved the issue.

Nigel Butler
on 7/7/15, 6:50 AM
1
David Bertha
On 7/7/15, 7:49 AM

If you check the odoo log file, do you see some GET lines between

POST /report/check_wkhtmltopd and POST /report/download ?

Example :

2015-07-07 11:45:52,236 3528 INFO new_dev werkzeug: 192.168.56.1 - - [07/Jul/2015 11:45:52] "POST /report/check_wkhtmltopdf HTTP/1.1" 200 -
2015-07-07 11:45:53,157 3528 INFO ? werkzeug: 127.0.0.1 - - [07/Jul/2015 11:45:53] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 200 -
2015-07-07 11:45:53,162 3528 INFO ? werkzeug: 127.0.0.1 - - [07/Jul/2015 11:45:53] "GET /website/static/src/css/website.css HTTP/1.1" 200 -
2015-07-07 11:45:53,173 3528 INFO ? werkzeug: 127.0.0.1 - - [07/Jul/2015 11:45:53] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 200 -
2015-07-07 11:45:53,179 3528 INFO ? werkzeug: 127.0.0.1 - - [07/Jul/2015 11:45:53] "GET /report/static/src/css/reset.min.css HTTP/1.1" 200 -
2015-07-07 11:45:53,504 3528 INFO ? werkzeug: 127.0.0.1 - - [07/Jul/2015 11:45:53] "GET /report/static/src/js/subst.js HTTP/1.1" 200 -
2015-07-07 11:45:53,603 3528 INFO new_dev werkzeug: 192.168.56.1 - - [07/Jul/2015 11:45:53] "POST /report/download HTTP/1.1" 200 -

If not, you can try this :

Settings ==> Parameters ==> System Parameters : add key = report.url, value= http://127.0.0.1:8069/

From : https://github.com/odoo/odoo/issues/2934

1

Ray Carnes

--Ray Carnes--
15707
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 7/7/15, 2:51 PM

0.12.2.1 is the wrong version.

 

 From

https://www.odoo.com/documentation/8.0/setup/install.html#deb 

I have the same issue than Nigel, downgrading to 0.12.1 did not fix anything, still Invoices appear with the default font.

E.M.
on 9/15/15, 7:30 PM
0
Tom Schiets
On 7/4/16, 1:11 PM

Settings ==> Parameters ==> System Parameters : add key = report.url, value= http://127.0.0.1:8069/ 
worked perfect for me!

0
Jatupong
On 11/3/15, 11:21 AM

Hi, if anyone still can't make it work. please try again to remove 12.2.1 (ensure it was removed completely) then try to install 12.1.2 from http://nightly.odoo.com/extra/. i'm using amd64.


in case you get dependency error about libjpeg62-turbo, download from this link and then install "http://ftp.tw.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.4.1-2_amd64.deb


after all dependency install then try install wkhtmltox-0.12.1.2_linux-jessie-amd64.deb  again, i'm quite sure at least it should book.


good luck.

0
Nigel Butler
On 7/7/15, 6:50 AM

 I am not sure how I can respond to your answers, when I try and comment on them it says I do not have enough points.

Ray Carnes - I have now downgraded to 0.12.1. If you fill in all the fields in the company address then it is still too long and covers up the "Ship To" address below it. But I think this has fixed the issue. 

David Bertha -Is this the Odoo Log File you are referring too? I added the key = report.url, value= http://127.0.0.1:8069/ to SYSTEM PARAMETERS, and it does not appear to have made any difference.  

Did you find a solution?

Mitul
on 10/22/15, 10:45 AM
0
Mitul
On 10/22/15, 10:40 AM

Has anyone found the solution.

My company name overlaps customer name and address

0
Bogdan Lisnenko
On 9/16/15, 3:01 AM

I have similar issue. This is not problem with wkhtml but with report template. Try Odoo 9 there are improvements on reports template

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

3 follower(s)

Stats

Asked: 7/7/15, 6:17 AM
Seen: 5854 times
Last updated: 8/6/16, 12:23 PM