Skip to Content
Menu
This question has been flagged
7 Replies
10817 Views

Hi all,

I installed Odoo 17 on debian 12 with wkhtmltopdf 0.12.6 . So if Odoo generates a pdf-invoice, no logo or footer is added. Is this a buf of Odoo or a does there exist a solution for this problem? 


thanks in advance for your help.

with best regards

HK

Avatar
Discard
Best Answer

Hi  HK​,

Try adding this record in Settings --> Technical --> Parameters  --> System Parameters

key: report.url

value: your_ip:port

Ref : https://www.youtube.com/watch?v=lC9p_QJUW1Q

or 

Try to downgraded the version Install wkhtmltopdf version 0.12.5

or

After this one, you need to configure your document layout. 

Go to setting --> Search Document Layout




Thanks

Avatar
Discard
Best Answer

I have faced the same issue while installing Odoo17 and here is how I fixed it.

  1. Find the installed version of Wkhtmltopdf 
    apt show wkhtmltopdf
  2. Remove if it is 0.12.6 or greater
    apt remove wkhtmltopdf
  3. Find the best suitable package version which is 0.12.6.1-3 based on your server from the below mentioned url
    https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3
  4. In my case for Ubuntu22.04 and amd64 architecture, I copied this download link
    https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
  5. Download the package
    wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
  6. Install the package
    dpkg -i wkhtmltox_0.12.6.1-3.jammy_amd64.deb
  7. In case of any dependency issue, run the below command to fix it
    apt install -f
  8. Symlink the binaries to the Odoo readable folders
    sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
    sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin


This did setup Wkhtmltopdf correctly on my server and resolved the Headers/Footers issue.


Avatar
Discard
Best Answer

@Harshad Padaya thank you your solution works great even with ubuntu 24.04 running odoo 17.... i had wkhtmltopdf v0.12.6.1-2 the jammy version works well ith 24.04. and you have the latest version installation. maybe odoo will create their own pdf engine in next verison.

Avatar
Discard
Best Answer

Hi,

Please verify that all the URLs in the system parameter is same as your URL Settings -> Technical -> parameters -> system parameters

On searching URL you can see the below options. verify the URLs are same as your URL

If it is okay, Then Please uninstall your current wkhtmltopdf package and install it again. You can use the below code

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 install -f


Hope it helps

Avatar
Discard
Best Answer

Hi,
Install wkhtmltopdf version 0.12.5 and see if it makes any difference.

Refer to this existing post:  https://www.odoo.com/forum/help-1/wkhtmltopdf-how-do-i-install-0-12-5-1-the-one-odoo-needs-on-ubuntu-20-04-177412

Thanks

Avatar
Discard
Author Best Answer


Hi all,

what to post the solution, but I am not allowed because I do not have enough Karma points.

How can I post the solution?


thanks in advance

HK


Avatar
Discard

Okay,

I've updated the answer please review that one.