Odoo Help


How to configure webkit for V7

on 3/6/13, 1:07 PM 26,114 views

I want to configure webkit for the v7 version of openerp. I want to use a different logo in the webclient then in the reports.

I've installed the module but I can't seem to get it working.

In the company configuration I get a new tab webkit. I've added some new logo's but I can't seem to get it working any help ?


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.

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

Davide Corio
on 3/6/13, 1:47 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.

Camptocamp SA
on 3/6/13, 1:52 PM
Davide Corio
on 3/6/13, 1:54 PM

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

on 3/7/13, 3:46 AM

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

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

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

Camptocamp SA
on 3/7/13, 9:34 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

Camptocamp SA
on 3/7/13, 10:36 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

Ahmad Khayyat
on 3/16/13, 4:25 AM

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

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

Added some info about using headers in multi company

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

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

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

@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

Camptocamp SA
on 1/10/14, 1:00 PM
Thomas Dubois
On 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

@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).
Camptocamp SA
on 3/8/13, 6:52 AM

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

Thomas Dubois
on 3/8/13, 7:11 AM

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

Kevin Shenk
on 3/26/13, 2:15 PM

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

Kevin Shenk
on 3/28/13, 6:25 PM

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

on 8/8/13, 2:21 PM

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

Miguel Angel
on 1/6/14, 1:22 PM
Fred Cruypennick
On 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
On 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

Thanks I fixed it while updating the answer with github repo

Camptocamp SA, Yannick Vaucher - Camptocamp
on 8/15/14, 5:12 AM
Davide Corio
On 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:


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

Camptocamp SA
on 3/6/13, 1:44 PM
On 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

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

Camptocamp SA
on 5/15/13, 12:09 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>)

Emad Sherbini
on 7/19/13, 3:41 PM

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

on 9/16/15, 3:22 AM
On 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é

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
on 3/14/13, 10:31 AM

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

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

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

Kevin Shenk
on 3/28/13, 6:27 PM
Michael Karrer
On 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?!?

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.

Camptocamp SA
on 3/19/14, 7:23 AM

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

Question tools

5 follower(s)


Asked: 3/6/13, 1:07 PM
Seen: 26114 times
Last updated: 9/16/15, 3:27 AM