Install Wkhtmltopdf Odoo 11 Windows
đ to install wkhtmltopdf ubuntu 18.04 Compatible with odoo 11wk.
There are multiple ways to install Odoo, or not install it at all, dependingon the intended use case.
This documents attempts to describe most of the installation options.
- Online
- The easiest way to use Odoo in production or to try it.
- Packaged installers
- Suitable for testing Odoo, developing modules and can be used forlong-term production use with additional deployment and maintenance work.
- Source Install
- Provides greater flexibility: e.g. allow multiple running Odoo versions onthe same system. Good for developing modules, can be used as base forproduction deployment.
- Docker
- If you usually use docker for development or deployment, an officialdocker base image is available.
Editions
There are two different Editions of Odoo: the Community and Enterprise versions.Using the Enterprise version is possible on our SaaS and accessing the code isrestricted to Enterprise customers and partners. The Community version is freelyavailable to anyone.
If you already use the Community version and wish to upgrade to Enterprise, pleaserefer to From Community to Enterprise (except for Source Install).
Online
Demo
To simply get a quick idea of Odoo, demo instances are available. They areshared instances which only live for a few hours, and can be used to browsearound and try things out with no commitment.
Demo instances require no local installation, just a web browser.
Wkhtmltopdf Download
SaaS
Trivial to start with, fully managed and migrated by Odoo S.A., Odooâs SaaSprovides private instances and starts out free. It can be used to discover andtest Odoo and do non-code customizations (i.e. incompatible with custom modulesor the Odoo Apps Store) without having to install it locally.
Can be used for both testing Odoo and long-term production use.
Like demo instances, SaaS instances require no local installation, a webbrowser is sufficient.
Packaged installers
Odoo provides packaged installers for Windows, deb-based distributions(Debian, Ubuntu, âŚ) and RPM-based distributions (Fedora, CentOS, RHEL, âŚ) forboth the Community and Enterprise versions.
These packages automatically set up all dependencies (for the Community version),but may be difficult to keep up-to-date.
Official Community packages with all relevant dependency requirements areavailable on our nightly server. Both Communtiy and Enterprise packages canbe downloaded from our Download page (you must to be logged in as a payingcustomer or partner to download the Enterprise packages).
Windows
- Download the installer from our nightly server (Community only)or the Windows installer from the Download page (any edition)
Run the downloaded file
Warning
on Windows 8, you may see a warning titled âWindows protectedyour PCâ. Click More Info thenRun anyway
- Accept the UAC prompt
- Go through the various installation steps
Odoo will automatically be started at the end of the installation.
Linux
Debian/Ubuntu
Odoo 11.0 âdebâ package currently supports Debian Stretch, Ubuntu Xenial,Ubuntu Zesty and Ubuntu Artful.
Prepare
Odoo needs a PostgreSQL server to run properly. The default configuration forthe Odoo âdebâ package is to use the PostgreSQL server on the same host as yourOdoo instance. Execute the following command as root in order to installPostgreSQL server :
In order to print PDF reports, you must install wkhtmltopdf yourself:the version of wkhtmltopdf available in debian repositories does not supportheaders and footers so it can not be installed automatically.The recommended version is 0.12.1 and is available on the wkhtmltopdf download page,in the archive section.
Wkhtmltopdf Install Ubuntu
Repository
Odoo S.A. provides a repository that can be used with Debian and Ubuntudistributions. It can be used to install Odoo Community Edition by executing thefollowing commands as root:
You can then use the usual apt-get upgrade
command to keep your installation up-to-date.
At this moment, there is no repository for the Enterprise Edition.
Deb Package
Instead of using the repository as described above, the âdebâ package can bedownloaded here:
- Community Edition: nightly
- Enterprise Edition Download
You can then use gdebi
:
Or dpkg
(handles less dependencies automatically):
This will install Odoo as a service, create the necessary PostgreSQL userand automatically start the server.
Warning
The 3 following python packages are only suggested by the Debian package.Those packages are not available in Ubuntu Xenial (16.04).
- python3-vobject: Used in calendars to produce ical files.
- python3-pyldap: Used to authenticat users with LDAP.
- python3-qrcode: Used by the hardware driver for ESC/POS
If you need one or all of the packages mentioned in the above warning, you can install them manually.One way to do it, is simply using pip3 like this:
Warning
Debian 9 and Ubuntu do not provide a package for the python modulenum2words.Textual amounts will not be rendered by Odoo and this could causeproblems with the âl10n_mx_ediâ module.
If you need this feature, you can install the python module like this:
Fedora
Odoo 11.0 ârpmâ package supports Fedora 26.As of 2017, CentOS does not have the minimum Python requirements (3.5) forOdoo 11.0.
Prepare
Odoo needs a PostgreSQL server to run properly. Assuming that the âsudoâcommand is available and configured properly, run the following commands :
In order to print PDF reports, you must install wkhtmltopdf yourself:the version of wkhtmltopdf available in Debian repositories doesnot support headers and footers so it is not used as a direct dependency.The recommended version is 0.12.5 and is available onthe wkhtmltopdf download page, in the archive section. Previouslyrecommended version 0.12.1 is a good alternative.More details on the various versions and their respective quirks can befound in our wiki.
Repository
Odoo S.A. provides a repository that can be used with the Fedora distibutions.It can be used to install Odoo Community Edition by executing the followingcommands:
RPM package
Instead of using the repository as described above, the ârpmâ package can bedownloaded here:
- Community Edition: nightly
- Enterprise Edition Download
Once downloaded, the package can be installed using the âdnfâ package manager:
Source Install
The source âinstallationâ really is about not installing Odoo, and runningit directly from source instead.
This can be more convenient for module developers as the Odoo source ismore easily accessible than using packaged installation (for information orto build this documentation and have it available offline).
It also makes starting and stopping Odoo more flexible and explicit than theservices set up by the packaged installations, and allows overriding settingsusing command-line parameters without needing toedit a configuration file.
Finally it provides greater control over the systemâs set up, and allows moreeasily keeping (and running) multiple versions of Odoo side-by-side.
Prepare
Source installation requires manually installing dependencies:
Python 3.5+.
on Linux and OS X, using your package manager if not installed by default
Note
on some system,
python
command refers to Python 2 (outdated)or to Python 3 (supported). Make sure you are using the rightversion and that the aliaspython3
is present in yourPATH
on Windows, use the official Python 3 installer.
Warning
select âadd python.exe to Pathâ during installation, andreboot afterwards to ensure the
PATH
is updatedNote
if Python is already installed, make sure it is 3.5 or above,previous versions are not compatible with Odoo.
PostgreSQL, to use a local database
After installation you will need to create a postgres user: by default theonly user is
postgres
, and Odoo forbids connecting aspostgres
.on Linux, use your distributionâs package, then create a postgres usernamed like your login:
Because the role login is the same as your unix login unix sockets can beuse without a password.
- on OS X, postgres.app is the simplest way toget started, then create a postgres user as on Linux
on Windows, use PostgreSQL for windows then
- add PostgreSQLâs
bin
directory (default:C:Program FilesPostgreSQL9.4bin
) to yourPATH
create a postgres user with a password using the pg admin gui: openpgAdminIII, double-click the server to create a connection, selectEdit ⣠New Object ⣠New Login Role, enter theusename in the Role Name field (e.g.
odoo
), then openthe Definition tab and enter the password (e.g.odoo
),then click OK.The user and password must be passed to Odoo using either the
-w
and-r
options orthe configuration file
- add PostgreSQLâs
Python dependencies listed in the
requirements.txt
file.on Linux, python dependencies may be installable with the systemâs packagemanager or using pip.
For libraries using native code (Pillow, lxml, greenlet, gevent, psycopg2,ldap) it may be necessary to install development tools and nativedependencies before pip is able to install the dependencies themselves.These are available in
-dev
or-devel
packages for Python,Postgres, libxml2, libxslt, libevent, libsasl2 and libldap2. Then the Pythondependecies can themselves be installed:on OS X, you will need to install the Command Line Tools(
xcode-select --install
) then download and install a package managerof your choice (homebrew, macports) to install non-Python dependencies.pip can then be used to install the Python dependencies as on Linux:on Windows you need to install some of the dependencies manually, tweak therequirements.txt file, then run pip to install the remaning ones.
Install
psycopg
using the installer herehttp://www.stickpeople.com/projects/python/win-psycopg/Then use pip to install the dependencies using the followingcommand from a cmd.exe prompt (replace
YourOdooPath
by the actualpath where you downloaded Odoo):
Less CSS via nodejs
on Linux, use your distributionâs package manager to install nodejs andnpm.
Warning
In debian wheezy and Ubuntu 13.10 and before you need to installnodejs manually:
In later debian (>jessie) and ubuntu (>14.04) you may need to add asymlink as npm packages call
node
but debian calls the binarynodejs
Once npm is installed, use it to install less:
on OS X, install nodejs via your preferred package manager (homebrew,macports) then install less:
on Windows, install nodejs, reboot (toupdate the
PATH
) and install less:
Fetch the sources
There are two ways to obtain the Odoo source code: zip or git.
- Odoo zip can be downloaded from our nightly server or our Download page,the zip file then needs to be uncompressed to use its content
- git allows simpler update and easier switching between different versionsof Odoo. It also simplifies maintaining non-module patches andcontributions. The primary drawback of git is that it is significantlylarger than a tarball as it contains the entire history of the Odoo project.
Community Edition
The git repository is https://github.com/odoo/odoo.git for the Communityedition.
Downloading it requires a git client(which may be available via your distribution on linux) and can be performedusing the following command:
Enterprise Edition
If you have access to the Enterprise repository (see Editionsif you wish to get access), you can use this command to fetch the addons:
Note
The Enterprise git repository does not contain the full Odoosource code. It is only a collection of extra add-ons. The main servercode is in the Community version. Running the Enterprise version actuallymeans running the server from the Community version with the addons-path optionset to the folder with the Enterprise version.
You need to clone both the Community and Enterprise repository to have a workingOdoo installation
Running Odoo
Once all dependencies are set up, Odoo can be launched by running odoo-bin
.
Tip
For the Enterprise edition, you must specify the enterprise
addons folder when starting your server. You can do so by providing the pathto your enterprise
folder in the addons-path
parameter. Pleasenote that the enterprise
folder must come before the defaultaddons
folder in the list for the addons to be loaded correctly.
Configuration can be provided either throughcommand-line arguments or through aconfiguration file.
Common necessary configurations are:
PostgreSQL host, port, user and password.
Odoo has no defaults beyondpsycopg2âs defaults: connectsover a UNIX socket on port 5432 with the current user and no password. Bydefault this should work on Linux and OS X, but it will not work onwindows as it does not support UNIX sockets.
- Custom addons path beyond the defaults, to load your own modules
Under Windows a typical way to execute odoo would be:
Where odoo
, odoo
are the postgresql login and passwordand mydb
the default db to serve on localhost:8069. You can add otherdirectory paths separated by a comma to addons
at the end of the addons-path option.
Under Unix a typical way to execute odoo would be:
Where mydb
is the default db to serve on localhost:8069. You can add otherdirectory paths separated by a comma to addons
at the end of the addons-path option.
Virtualenv
Virtualenv is a tool to create Python isolated environments because itâssometimes preferable to not mix your distribution python modules packageswith globally installed python modules with pip.
This section will explain how to run Odoo in a such isolated Python environment.
Here we are going to use virtualenvwrapper which is a set of shell scripts thatmakes the use of virtualenv easier.
The examples below are based on a Debian 9 distribution but could be adapted onany platform where virtualenvwrapper and virtualenv are able to run.
This section assumes that you obtained the Odoo sources from the zip file or thegit repository as explained above. The same apply for postgresql installationand configuration.
Install virtualenvwrapper
This will install virtualenvwrapper and activate it immediately.Now, letâs install the tools required to build Odoo dependencies if needed:
Create an isolated environment
Now we can create a virtual environment for Odoo like this:
With this command, we ask for an isolated Python3 environment that will be namedâodoo-envâ. If the command works as expected, your shell is now using thisenvironment. Your prompt should have changed to remind you that you are usingan isolated environment. You can verify with this command:
This command should show you the path to the Python interpreter located in theisolated environment directory.
Now letâs install the Odoo required python packages:
After a little while, you should be ready to run odoo from the command line asexplained above.
When you you want to leave the virtual environment, just issue this command:
Whenever you want to work again with your âodoo-venvâ environment:
Docker
The full documentation on how to use Odoo with Docker can be found on theofficial Odoo docker image page.
To install Wkhtmltopdf on your system, follow the steps described below.
Linux and OS X
Execute the following command:
Install the necessary dependencies:
Debian:
CentOS:
Download the latest version of the package from the Wkhtmltopdf project releases page and install it. Replace the X.Y.Z and PLATFORM placeholders with the correct version and platform strings from the release filename.
NOTE: The latest version of Wkhtmltopdf is not compatible with Odoo in some Linux distributions. Please check the recommended version for your Linux distribution in the Odoo GitHub repository.
Debian:
CentOS:
Restart all running servers:
PDF options will now be available in your application.
Troubleshooting
If you experience issues with display resolution on Linux platforms, they could be related to the xfonts-75dpi or xfonts-100dpi packages. Uninstall them by executing:
Windows
- Download the latest version of the package from the Wkhtmltopdf project releases page.
- Uncompress the downloaded archive and add the wkhtmltoxbin directory to your system path.
- Restart all running servers.
PDF options will now be available in your application.