تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
13 الردود
29045 أدوات العرض

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

أفضل إجابة

Yes that's right, we've resolved the issue by add
 System Parameters : add key = report.url, value= http://127.0.0.1:8069/ 
wkhtmltox-0.12.1_linux-trusty-amd64.deb

الصورة الرمزية
إهمال

it works for me, thank you

أفضل إجابة

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

الصورة الرمزية
إهمال
أفضل إجابة

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.

أفضل إجابة

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

الصورة الرمزية
إهمال
أفضل إجابة

Has anyone found the solution.

My company name overlaps customer name and address

الصورة الرمزية
إهمال
أفضل إجابة

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.

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
أفضل إجابة

Hello 

Please follow below step:

Download wkhtmltopdf patched with qt using below command

 - sudo wget -P Downloads https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb

Here, replace "trusty" with your OS name and if 64 bit only then keep "amd64" like that , otherwise change it to "i386" and down load the deb file.

After that execute the following commands,

cd ~/Downloads

- sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb

Now, check wkhtmltopdf version with below command,

- wkhtmltopdf -V

Hope above step help full.

Best Thanks,

Ankit H Gandhi.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

 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?