This tutorial covers Odoo 12 installation on Ubuntu 18.04. And on the bright side, the same steps also work with Odoo 13 or Ubuntu 16.04.

Odoo is an open-source ERP framework in Python. It uses PostgreSQL database. The Python version required with this tutorial is 3.5 or above. Since we are using Ubuntu 18.04 here, the default python version is 3.6.9. Some web components and node package manager (npm) is also required before installing Odoo. We will use a git repository tree to obtain Odoo 12. The same git repository also has every other version of Odoo that you may wish to install.

Step 1: Update & Upgrade Ubuntu Environment

sudo apt update && apt upgrade

Step 2: Installing Python, Database and Web Dependencies

Ubuntu has Python3 but no pip or postgresql and multiple other web dependencies.

Installations with APT (Advanced Package Tool)

sudo apt install python3-pip build-essential wget python3-dev python-psycopg2 python3-venv python3-wheel python3-setuptools libxslt-dev libzip-dev libpq-dev libldap2-dev libsasl2-dev postgresql npm node-less git

To verify intallations use: dpkg --list

Installations with PIP (Python Package Manager)

sudo pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 libsass lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen psycopg2 pydot pyparsing PyPDF2 pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject Werkzeug==0.16.0 XlsxWriter xlwt xlrd

To verify intallations use: pip3 list

Create database user

sudo su postgres createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo exit

Create the OpenERP user that will own and run the application

sudo adduser --system --home=/opt/odoo --group odoo

Step 3: Install Odoo 12 using git

Login as Odoo user and change directory to /opt/odoo

sudo su - odoo -s /bin/bash
git clone --depth 1 --branch 12.0 --single-branch

Start/Launch/Run Odoo

cd odoo

To create a module names academy and module directory named myaddons simply run:

./odoo-bin scaffold academy myaddons

Start odoo with custom addons named myaddons run:

./odoo-bin --addons-path=addons,myaddons

Lastly, visit: localhost:8069/web/database/manager