Skip to Content
Menu
This question has been flagged
3 Replies
6219 Views

Hello,


wkhtmltopdf is working but working wrong. When I try to create sample invoice, it creates invoice, but with wrong layout, no fonts, colors, just text.  As a result whencustomer  pressing "pay now" with a transfer, site crashes with internal error. 


This happend after i turned on ufw.  

Tried to disabled it, but nothing changed.  


I tried:

  1. Remove wkhtmltopdf  and packages  and install again.

sudo apt-get remove --auto-remove wkhtmltox 
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb 
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt -f install

      2.    Remove wkhtmltopdf, packages and settings  and install again.

sudo apt-get purge --auto-remove wkhtmltox 
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb sudo apt -f install     

After instalation seems everything fine:

wkhtmltopdf 0.12.5 (with patched qt)

This is link to the sample invoice  https://www.dropbox.com/s/hidoai3kem9xaq6/Capture.JPG?dl=0 


Hope for solution.


Avatar
Discard

are you sure about the configuration of your base url?

Seems like you don't have your assets loaded.

Do you see the requests in your logs ?

Author

1. Not sure, any links where to look for right info for configuration?

this is log file hope this is usefull

2020-04-10 10:06:51,901 922 INFO ? odoo: Odoo version 13.0-20200410

2020-04-10 10:06:51,902 922 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf

2020-04-10 10:06:51,902 922 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/.local/share/Odoo/addons/13.0']

2020-04-10 10:06:51,902 922 INFO ? odoo: database: odoo@default:default

2020-04-10 10:06:51,991 922 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf

2020-04-10 10:06:52,063 922 WARNING ? odoo.addons.base.models.res_currency: The num2words python library is not installed, amount-to-text features won't be fully available.

2020-04-10 10:06:52,084 922 INFO ? odoo.service.server: HTTP service (werkzeug) running on ipsy.l.dedikuoti.lt:8069

2020-04-10 10:06:52,544 922 INFO Alfametal odoo.modules.loading: loading 1 modules...

2020-04-10 10:06:52,557 922 INFO ? odoo.http: HTTP Configuring static files

2020-04-10 10:06:52,560 922 INFO Alfametal odoo.modules.loading: 1 modules loaded in 0.02s, 0 queries

2020-04-10 10:06:52,606 922 INFO Alfametal odoo.modules.loading: loading 131 modules...

2020-04-10 10:06:54,034 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_partnerledger has no _description

2020-04-10 10:06:54,035 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_general_ledger has no _description

2020-04-10 10:06:54,035 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_trialbalance has no _description

2020-04-10 10:06:54,035 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_tax has no _description

2020-04-10 10:06:54,035 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_agedpartnerbalance has no _description

2020-04-10 10:06:54,035 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_journal has no _description

2020-04-10 10:06:54,035 922 WARNING Alfametal odoo.models: The model report.accounting_pdf_reports.report_financial has no _description

2020-04-10 10:06:54,460 922 INFO ? werkzeug: 84.15.189.8 - - [10/Apr/2020 10:06:54] "GET /web/static/src/img/spin.png HTTP/1.1" 304 - - - -

2020-04-10 10:06:55,162 922 INFO Alfametal odoo.modules.loading: 131 modules loaded in 2.55s, 0 queries

2020-04-10 10:06:55,778 922 WARNING Alfametal odoo.fields: Field crossovered.budget.user_id: parameter 'oldname' is not longer supported; use an upgrade script instead.

2020-04-10 10:06:56,009 922 INFO Alfametal odoo.modules.loading: Modules loaded.

2020-04-10 10:06:56,022 922 INFO Alfametal odoo.addons.base.models.ir_http: Generating routing map for key 1

2020-04-10 10:06:56,031 922 INFO Alfametal odoo.addons.base.models.ir_http: Generating routing map for key 1

2020-04-10 10:06:56,236 922 INFO Alfametal werkzeug: 84.15.189.8 - - [10/Apr/2020 10:06:56] "POST /base_setup/data HTTP/1.1" 200 - 9 0.010 3.668

2020-04-10 10:06:56,239 922 INFO Alfametal werkzeug: 84.15.189.8 - - [10/Apr/2020 10:06:56] "POST /base_setup/demo_active HTTP/1.1" 200 - 20 0.035 3.677

2020-04-10 10:06:56,796 922 INFO Alfametal werkzeug: 84.15.189.8 - - [10/Apr/2020 10:06:56] "POST /calendar/notify HTTP/1.1" 200 - 3 0.003 0.005

Author Best Answer

Solved the problem.  

Main problem was with header and footer it fixed then i went to:

odoo, turned on developer mode->search bar-> system parameters  -> create new -> name of the parameter:  report.url   and description is  your ip address  : and port. (usualy 8069), or just use this : http://127.0.0.1:8069    that should help.  Thanks.

link to answer :     https://stackoverflow.com/questions/47055149/why-my-pdf-report-is-not-taking-the-css-styles-well-in-odoo 

Avatar
Discard
Related Posts Replies Views Activity
0
Aug 20
5206
1
Apr 23
1969
4
May 24
10071
1
Apr 24
1562
0
Nov 23
525