Odoo Help


8 Answers

Yannick Vaucher Switzerland

--Yannick Vaucher--

| 5 7 11
Lausanne, Switzerland
--Yannick Vaucher--

Yannick Vaucher Switzerland
3/6/13, 1:43 PM

Installing webkit reports

Here are the base you need to know to be able to install webkit report in Odoo 7.0.

All modules can be found on http://apps.odoo.com or on https://github.com

Required branches

In 7.0 webkit engine is part of the official addons. module: Webkit Report Engine

However, for specific webkit reports you needs to get them from OCA community repository or from http://apps.odoo.com:

Here are the branches you will need to get to install all reports in Odoo 7.0

And you will also need the following branch to get the base headers:

  • Webkit Tools: OCA/webkit-tools
    Get it with: `git clone https://github.com/OCA/account-financial-reporting -b 7.0`

Webkit library

To install the required webkit library you can it get here: http://code.google.com/p/wkhtmltopdf/

If it is in your system path you won't need to configure your OpenERP to find it. Otherwise, you must specify the path as webkit_path in OpenERP system parameters under `Settings -> Customization -> Low Level Object -> System Parameters`.

Adding Logo

As an example, you will find a camptocamp_logo value in the default header. In `Setting -> Technical -> Webkit Logos`, you can add a new logos.

Headers edition

Headers are stored in `Setting -> Technical -> Webkit Headers/Footers` just under the Webkit Logos menu. You can change them there.

And then changing the line in your header will display your logo:


Use a specific header in a report

If you select headers, you can select the header used from your report in `Settings -> Technical -> Actions -> Reports` in tab Webkit.


In case of multi-company you can also set different headers per company. The Webkit Header field in your report is a property.

To define a header per company go in `Settings -> Technical -> Parameters -> Configuration Parameters` search for the webkit_header_default

Recreate the same parameter per company by specifying the Company field (Your user must be in group Multi Companies to see it). Plus replace the Base Sample value by the right header.

Davide Corio, Davide Corio Italy
3/6/13, 1:47 PM

oh, didn't know of lp:webkit-utils. thanks. soon we'll need a full map of community projects :)

Camptocamp SA Switzerland
3/6/13, 1:52 PM

I don't have a map but here might be a compas :) community teams If you go down in each team, you will see the related projects.

Davide Corio, Davide Corio Italy
3/6/13, 1:54 PM
ed Belgium
3/7/13, 3:46 AM

i'll check it out today !! thanks for the great explanation!!

Daniel Reis Portugal
3/7/13, 5:17 AM

I think it would be important for this information to be included in the Webkit report module.

Camptocamp SA Switzerland
3/7/13, 9:34 AM

I just made, a little correction about where to find all Webkit Logos and Headers.

Camptocamp SA Switzerland
3/7/13, 10:36 AM

@Daniel Reis You are right, but be last time I tried to update the descriptor took ages, my last MP hasn't even been accepted yet. If I have time I'll make another MP

Ahmad Khayyat Saudi Arabia
3/16/13, 4:25 AM

@Yannick I managed to install webkit reports on v7.0 and to create a sample (i.e. useless) report. I, however, was unable to get the financial reports community module (lp:account-financial-report/7.0) to produce any reports.

I filed a bug report here: https://bugs.launchpad.net/account-financial-report/+bug/1129867

Camptocamp SA Switzerland
3/16/13, 1:41 PM

Thank you for the bug report. Please see my comment on launchpad bug lp:1129867

Camptocamp SA Switzerland
3/27/13, 1:30 PM

Added some info about using headers in multi company

Versão Integral, Anabela Damas Portugal
1/8/14, 11:04 AM

Hi, I'm trying to put the image in the report, I was trying to do what you said but nothing happens where do I put this line :


In my header I don't have nothing similar to this...

Camptocamp SA Switzerland
1/10/14, 1:00 PM

@Anabela Damas You will find this code in webkit headers installed with module . base_headers_webkit http://bazaar.launchpad.net/~webkit-utils-core-editors/webkit-utils/7.0/view/head:/base_headers_webkit/base_headers_data.xml.

You can use the same helper to add image in the body of your report. You aren't forced to use a <td> html balisis

Thomas Dubois France
3/8/13, 6:23 AM


Thanks to Yannick's comments, I managed to get stuff installed. Here's how I did it. It's certainly not the best way, but at least my way :)

• Install bzr

apt-get install bzr

• Create an addons folder, I did it on /opt/openerp-custom

cd /opt/openerp-custom

mkdir sources

cd sources

bzr branch lp:account-invoice-report/7.0 account-invoice-report

bzr branch lp:sale-reports/7.0 sale-report

bzr branch lp:account-financial-report/7.0 account-financial-report

bzr branch lp:webkit-utils webkit-utils

cd ..

mkdir addons

cd addons

ln -s ../sources/sale-report/sale_order_webkit/ sale_order_webkit

ln -s ../sources/account-invoice-report/invoice_webkit/ invoice_webkit

ln -s ../sources/webkit-utils/base_headers_webkit/ base_headers_webkit

ln -s ../sources/webkit-utils/report_webkit_chapter_server/ report_webkit_chapter_server

(do the same for financial reports if you need them)

• Install wkhtml2pdf

Go to http://code.google.com/p/wkhtmltopdf/ and download the latest wkhtmltopdf (people were saying that the static version was best, forgot to note source, sorry)


wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2

bunzip2 wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2

tar -xvf wkhtmltopdf-0.11.0_rc1-static-i386.tar

mv wkhtmltopdf-i386 /usr/bin/wkhtmltopdf

• Update OpenERP configuration.

vi /etc/openerp/openerp-server.conf


addons_path = /usr/lib/pymodules/python2.7/openerp/addons,/opt/openerp-custom/addons

(make sure your default addons_path is /usr/lib/pymodules/python2.7/openerp/addons. You can check that in the server log, the path is given on startup)

Restart OpenERP service openerp restart

• Go to web interface

Make sure your admin users has technical capabilities (else edit your user in Conf / Users, access rights tab and check "Technical features")

• Update modules list

Under Configuration / Modules, click "Update Modules list"

• Go to "Installed modules"

In the search bar, remove the "Installed" tag and search for "webkit" instead.

You should see the modules that are in /opt/openerp-custom/addons

Install them

• Test Go to Configuration Header/Footers for Webkit and edit "Base Reports Portrait Header"

Specify your company there.

Try to print a quote, cross fingers :)

• Customization

Edit headers and footers in Configuration / Header-Footers for Webkit

I edited the "Base Reports Portrait Header"

Edit templates in Configuration / Action / Reports. I edited sale.order

If you use custom fonts, add them to the system (I added them to /usr/share/fonts/truetype and ran fc-cache -fv )

Hope this will save someone some hours trying to find out how to install that :)

Best, Thomas

Camptocamp SA Switzerland
3/8/13, 6:52 AM

@Thomas You don't need to add symlinks in addons folder, you can add branches by specifying the path in you config file under param named addons_path or with a command line option:

--addons-path=ADDONS_PATH specify additional addons paths (separated by commas).
Thomas Dubois France
3/8/13, 7:11 AM

@Yannick oops, yes, OpenERP. For symlinks, I didn't want to everytime edit the server config

Kevin Shenk United States
3/26/13, 2:15 PM

This is one of the most thoroughly documented answers/tutorials I've come across. Thanks!!

Kevin Shenk United States
3/28/13, 6:25 PM

You don't need to setup wkhtmltopdf if you use this ppa: launchpad.net/~trevor/+archive/wkhtmltopdf

vivek India
8/8/13, 2:21 PM

Hi, This was really useful Thomas and Yannik, Thank You for your good work

Miguel Angel Spain
1/6/14, 1:22 PM

bzr branch lp:webkit-utils webkit-utils --> bzr branch lp:webkit-utils/7.0 webkit-utils

Fred Cruypennick Switzerland
2/11/14, 1:00 PM

For those who got an issue like me with wkhtmltopdf from the openerp web interface (local command line is working fine btw), I was able to solve it by reinstalling an old version of it:

sudo wget "http"://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
sudo bunzip2 wkhtmltopdf-0.9.9-static-amd64.tar.bz2
sudo tar -xvf wkhtmltopdf-0.9.9-static-amd64.tar
sudo mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf

I use OpenERP 7 on ubuntu 12.04 64bits just remove the quotes between http (it's because of my basic karma on this forum)


Med Said BARA Algeria

--Med Said BARA--

| 6 5 10
Guelma, Algeria
--Med Said BARA--

Med Said BARA Algeria
3/30/14, 11:04 AM


Wrong link for: Financial Reports: module account_financial_report_webkit in lp:account-financial-report/7.0

The good link: lp:account-financial-report/7.0

1 Comment
Camptocamp SA, Yannick Vaucher Switzerland
8/15/14, 5:12 AM

Thanks I fixed it while updating the answer with github repo


Davide Corio Italy

--Davide Corio--
Davide Corio
| 5 4 9
Bricherasio, Italy
--Davide Corio--

Odoo Evangelist and Consultant

Davide Corio Italy
3/6/13, 1:13 PM

the report_webkit module doesn't install reports. this means you'll have to create your own reports or find and install reports made for webkit, like this one:


1 Comment
Camptocamp SA Switzerland
3/6/13, 1:44 PM

This branch doesn't contain the last version of account_invoice_webkit the module has been moved in lp:account-invoice-report/7.0

LAKHSAM Khalid Morocco
3/8/13, 6:30 AM

Hi, I successed to install webkit on ubuntu 12.10/OP7 But I didn't for windows. Plz can someone give us the efficent method to install webkit on windows 7

Camptocamp SA Switzerland
5/15/13, 12:09 PM

If you mean installing the library on Windows, you might create a new question

Emad Sherbini Saudi Arabia
7/19/13, 3:41 PM

Hi, I have windows server 2003 Installed openerp 7 under : C:\Program Files (x86)\OpenERP 7.0 Installed wkhtmltopdf “wkhtmltox-0.11.0_rc1-installer.exe ”under : C:\Program Files (x86)\wkhtmltopdf Installed Financial Reports – Webkit v. 1.0 Under System Parameters add: Key : webkit_path Value : C:\Program Files (x86)\wkhtmltopdf

But when I run the General Ledger report I get the following error: coercing to Unicode: need string or buffer, bool found (<type 'exceptions.TypeError'>, TypeError('coercing to Unicode: need string or buffer, bool found',), <traceback object at 0x10A115A8>)

Odoo India
9/16/15, 3:22 AM

I am facing the same issue.....How to resolve this issue ...need a help from some one...............

René Switzerland
3/14/13, 10:24 AM

Hi, I tried to installed all webkit components as described in this thread, but it seems that webkit-headers available in lp:webkit-utils are not yet compatible with V7. Where can they be downloaded? René

Camptocamp SA Switzerland
3/14/13, 10:31 AM

base_headers_webkit module was ported to v7.0 at revision 14 And by the way it is mainly a templates so nothing really changes between 6.1 and 7.0.

If there is a bug, please report it. If by non-compatible headers, you mean they aren't printed, you might not have the right wkhtmltopdf librairy version.

Camptocamp SA Switzerland
3/27/13, 1:34 PM

@René make sure you took lp:webkit-utils/7.0 branch not the lp:webkit-utils which leads to 6.1 version

Kevin Shenk United States
3/28/13, 6:27 PM

@René please post your comment under the instructions you're referring to, don't start a new answer.

Michael Karrer Austria
2/13/14, 6:30 AM

Is this post still valid?

There has been another branch in Launchpad called lp:openerp-reporting-engines that seems to hold the utils now - is lp:webkit-utils/7.0 still needed at all?!?

1 Comment
Camptocamp SA Switzerland
3/19/14, 7:23 AM

openerp-reporting-engine gather modules of type of reports that aren't in openerp core. Thus, for webkit base headers, you still need the ones in webkit-utils.

Ask a Question
Keep Informed
5 follower(s)
About This Community

This platform 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.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now