In this tutorial I will show how to install Odoo 8 and Odoo 9, the setup mechanism is almost the same, I will let you know when there is something that is required by Odoo 9 but its almost the same for both versions of Odoo.
I will be writing this tutorial on Ubuntu 14.04 but you can also apply it to Ubuntu 12.04, I chose these versions for their stability and alot others but you can try it on any Flavor of Ubuntu (and Linux).
1. Set up System and Pre-requisite packages for Odoo
Lets First Update our repository and update all the packages by issuing the following commands
The username of VM is odoo and its password is admin
btw I will be deleting Odoo 8 soon, because I dont have that much space on my google drive to keep all this stuff.
To do it Manually Follow the Process Below…
Now Lets install all the Pre-Requisites
sudo apt-get install git openssh-server graphviz ghostscript \
python-dateutil python-feedparser python-matplotlib \
python-ldap python-libxslt1 python-lxml python-mako \
python-openid python-psycopg2 python-pybabel python-pychart \
python-pydot python-pyparsing python-reportlab python-simplejson \
python-tz python-vatnumber python-vobject python-webdav \
python-werkzeug python-xlwt python-yaml python-imaging \
gcc python-dev mc bzr python-setuptools python-babel \
python-feedparser python-reportlab-accel python-zsi python-openssl \
python-egenix-mxdatetime python-jinja2 python-unittest2 python-mock \
python-docutils lptools make python-psutil python-paramiko poppler-utils \
python-pdftools python-scipy python-decorator python-requests python-pyPdf \
antiword postgresql postgresql-client postgresql-server-dev-9.3
Some more packages for Odoo 9
sudo apt-get install build-essential libldap2-dev libsasl2-dev npm nodejs libxml2-dev libxslt1-dev libjpeg-dev python-pip gdebi
NodeJS and other stuff to Run Odoo website
sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node
wkhtmltopdf to print odoo 8 and odoo 9 reports
cd /tmp && wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo gdebi -n wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/
For Ubuntu 14.04 users, Install the Package “python-passlib” as ivan albizu just commented that its lack causes “error 500 Internal Server” Error. To Install this package simply type.
sudo apt-get install python-passlib
2. Setup Eclipse
- If you haven’t Already, Click here to Download Eclipse. I recommend the Eclipse Luna version. Once Eclipse is Downloaded and Extracted. Launch it.
- Now we need to install pydev. To do so Click Help -> Install New Software
- From the “Install” Dialog box, Click Add
- In “Add Repository” dialog box, Type “pydev” in the “Name:” field and “http://pydev.org/updates” in “Location:” field and Click OK.
- In Next Windows, uncheck “Show only the latest version of the available software“, You will get a list of available versions of pydev to select from, Select 2.7.5 version and click Next. If you dont fine pydev 2.7.5 check the note below.
While I was trying to install pydev for odoo 9, I couldn’t find pydev 2.7.5, It only showed the 4.4 version. To work around this problem, Download pydev from this link. Extract the zip archive, The Repeat the steps of installing pydev by going to HELP -> Install New Software -> Click “Add” and this time instead of adding, pydev url, click the Local Button as show in the image below and navigate to the directory where you extracted pydev and click ok.
- Next uncheck “Groups Items by category” and you will see the 2.7.5 version of pydev check it and carry on with the Rest of Installation.
- Click Next again and In Next Windows from accept the license Agreement and and Click Finish and the Installation Process will begin.
- Somewhere during installation you will be asked whether you trust the certificates of Aptana Pydev, Click “Select All” and Click OK to to exit the dialog box.
- Once pydev installation is Done. We need to setup the GIT repository in order to download Odoo Source code. To do so, Click Windows -> Open Perspective -> Other
- A Window will Open ask you to select a perspective. Click Git
- In Next Windows Select “Clone a Git Repository“
- Here type “https://github.com/odoo/odoo.git“. The Rest of the Fields will get auto-fill, If not Do it according to the image below. Click Next
- You will be presented which Branches you want to clone, You can see all of the versions of Odoo. Deselect All and and Select 8.0 or 9.0 or which ever you will to.
- In next windows Select the Directory where you want to clone the Source and Click Finish. The Cloning Process will begin. This Process may Take a while depending on the speed of you Internet.
- Once the Cloning is Done. We need to import the source in to Eclipse. To do So, First we need to Setup eclipse’s Perspective to work with Python. To do so click Window -> Open Perspective -> Other and from the Window Select Pydev and Click OK.
- Next we Need to setup the Interpreter for python. To do so, Click Windows -> Preference and In the Left Pane, Select Pydev and the Interpreter Python and then Click Auto-Config on the Right side, The System will automatically detect Your python version and setup paths and rest of environment variables. Click OK to Close this Windows once eclipse is done setting up Environment.
- Now to import the source code into eclipse Click File -> Pydev Project. In project name type odoo (or which ever name you like). uncheck Use Default and click Browse and select the source directory as shown below and click Finish.
- And you are done with Setting up Eclipse.
3. Setting up Odoo Configuration File
To create configure file for odoo type the following command
sudo nano /etc/openerp-server.conf
and then copy and paste the content below
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /home/waqar/odoo/addons
ctrl + o to save the file and ctrl + x to exit nano.
Replace the Path to addons with your own addons directory. If you have followed exactly what I did, You wont be needing to change any of the above configuration.
4. Configure PostgreSQL server
Now we need create a role in PostgreSql for the user that will be Running Eclipse (and the Odoo Server in return). In Normal cases the will be the current logged-in user i.e your username with which you login.
To do so Type
sudo su postgres
psql -t template1
template1=# create user waqar with superuser password ‘postgres’;
and type “exit” to exit from postgres user.
5. Running the Code
In Eclipse, Package Explorer, Right Click odoo.py and select Run As Python Run
The Server will start Running.
Now to access the Webclient. Open your favorite Browser even if its Internet Explorer and type “localhost:8069” or “your IP Address:8069” and your done, Below the screen shot of Odoo 8.
Here the Screenshot of Odoo 9
Thats it. Do let me know If I am missing anything or I can add anything to it.