Install Odoo 10.0 ( Community) on Ubuntu 16.04 LTS

Hello everyone

This article will help you to install Odoo-10 Community on Ubuntu 16.04 LTS.

The script that will be used in this installation  is based on the one done by Yenthe.

To do so, I adv ice you to refer to that link and follow the script used.

http://www.odoo.yenthevg.com/installing-odoo-10-ubuntu-16-04/ 

The next article, will be about debugging Odoo-10 (Community) using PyCharm Community on Ubuntu 16.04 LTS.
Wish you best of luck ^^

Please find here the Demo of  “how to debug Odoo 10 using Pycharm IDE on Ubuntu 16.04 LTS”:

https://www.youtube.com/watch?v=O7OdXcYCo3o

You could also see this two tutorials that show how:

Best of luck ^^

Debug Odoo 9 & 8 using Eclipse IDE

Hello everyone
We will show you in this tutorial, how to debug Odoo V9 / V8 from Eclipse IDE ( step by step ). We will be working on Ubuntu  14.04 for stability reasons, but you can use any other version.

Update the system and install necessary packages for Odoo :

First thing to do is to update your system, which let you get the newest versions of packages and their dependencies existing on your machine.

#sudo apt-get update
#sudo apt-get upgrade

aptget upgrade

aptget update

Then we should install the Prerequisites packages for Odoo :

#sudo apt-get install python-cups python-dateutil python-decorator python-docutils python-feedparser python-gdata python-geoip python-gevent python-imaging python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests python-simplejson python-tz python-unicodecsv python-unittest2 python-vatnumber python-vobject python-werkzeug python-xlwt python-yaml wkhtmltopdf

To install wkhtmltopdf (a package that let you print reports in Odoo 8 & 9), you should run this commands :

#sudo wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
#sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
#sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
#sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

For Ubuntu 14.04 users, you should install “python-passlib” package, to avoid “error 500 Internal Server” Error :

#sudo apt-get install python-passlib

Setup Eclipse :

Very Important : For me I used LiClipse is a very featured Eclipse (Provides a number of enhancements) for Linux with PyDev (Python) support, To install/run it : (A big thanks to arulmr)

LiClipse is the lightweight version of the most popular Eclipse IDE and it includes PyDev and Egit by default which will help python/django developers

To install it follow my article Liclipse (Eclipse) Installation on Ubuntu

Once LiClipse 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

Eclipse 7

A Window will Open ask you to select a perspective. Click Git

Eclipse 8

 

In Next Windows Select “Clone a Git Repository

Eclipse 9

In th URI field type “https://github.com/odoo/odoo.git“ | In the Host field type “github.com“ | In the Repository path type “/odoo/odoo.git“. Click Next

Eclipse 10

You will be presented which Branches you want to clone, You can see all of the versions of Odoo. Select only 8.0 or 9.0 or which ever version you want.

In next windows Select the Directory where you want to clone the Source and Click Finish (We recommend Eclipse workspace  : /home/workspace/odoo). The Cloning Process will begin. This Process may Take a while depending on the speed of your Internet.

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

Eclipse 11

To setup the Interpreter for python, 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. Click OK to Close this Windows once eclipse is done setting up Environment.

Eclipse 13

To dispaly your code in Eclipse Click File -> Pydev Project.

In project name type odoo the name you like. uncheck Use Default and click Browse and select the source directory (The directory that you specified earlier, where cloning the source. As an example we used /home/workspace/odoo ) and click Finish.

We Finished with setting up Eclipse for Odoo use.

Setting up Odoo Configuration File

You can create your own config file for Odoo like this one :

#sudo nano /etc/openerp-server.conf

Copy this content in the file :

[options]
; 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/workspace/odoo/addons

( In addons_path you should use your own addons directory )

ctrl + o to save the file and ctrl + x to exit nano

To take this file in consideration go to the “Running the Code of Odoo from Eclipse” step.

Configure PostgreSQL server

Now we need to create a role in PostgreSql for the user that will be Running Eclipse.

Usually we use our current user

#sudo su postgres
#psql -t template1
#template1=# create user usmanbek with superuser password 'postgres';
#template1=# \q

Running the Code of Odoo from Eclipse

To take the openerp-server.conf file in consideration, you should go to Eclipse openerp-server -> Run As -> Run Configuration.

config 1

In the argument tab click on Variables.

config 2

A select variable box appears. Click on Edit Variables.

config 3

A preferences box appears. Click on New.

config4

A new box appears. Put whatever you want in “Name” field, Ex: Config file | In the “Value” field put : –config=/etc/openerp-server.conf

config5

Choose the variable you have just created (for my case it’s Config file) and Click Ok

config 6

Finally you click on Run 🙂

Now to access the Webclient, type localhost:8069. You will see this page.

odoo running

Congratulation, now you can develop Odoo modules easily