Odoo 10 dev install

Virtual env setup for linux

1. Get your linux username o which you do your development


2. Update your linux machine

sudo apt-get update &&
sudo apt-get -y upgrade

3. Install needed frontend dependancies

sudo apt-get install -y git libxml2-dev libjpeg-dev libldap2-dev libsasl2-dev libxslt1-dev &&
sudo apt-get install -y python-dev libtiff5-dev node-clean-css node-less libpng-dev &&
sudo apt-get install -y nodejs gdebi python-pip &&
sudo apt-get install -y npm

sudo npm install -y -g less less-plugin-clean-css &&
sudo ln -s /usr/bin/nodejs /usr/bin/node

4. Install virtual env and postgresql

sudo apt-get install -y postgresql postgresql-contrib &&
sudo apt-get install postgresql &&
sudo apt-get install libpq-dev &&
sudo apt-get install python-psycopg2 &&
sudo /usr/bin/pip install virtualenv

4. Install wkhtmltox

cd /opt/ &&
sudo wget &&
sudo tar xf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz &&
sudo rm wkhtmltox-0.12.3_linux-generic-amd64.tar.xz &&
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/bin &&
sudo ln -s /opt/wkhtmltox/bin/wkhtmltoimage /usr/bin

5. Create your DB username with your machines uname

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

6. Get odoo 10.0

sudo adduser --system --group odoo --home /opt/odoo
sudo git clone --depth 1 --branch 10.0 --single-branch /opt/odoo/odoo-10
sudo chown -R odoo: /opt/odoo

7. Install _venv requirements and testing tools

sudo su - odoo -s /bin/bash
cd /opt/odoo/odoo-10 &&
sudo virtualenv ./_venv &&
source ./_venv/bin/activate &&
pip install -r ./requirements.txt &&
pip install ./

pip install anybox.testing.openerp

8. Change folder owner from odoo to your dev user

sudo chown -R :odoo /opt/odoo

9. Change the shebang on odoo-bin and

vim /opt/odoo/odoo-10/odoo-bin
Replace the first line of the file with this one:

10. Finally test-run your server!

cd /opt/odoo/odoo-10 &&
source ./_venv/bin/activate &&

Optional items

Some more options you can explore using virtualenv

11. Connect to a remote psql db

Forward your port via ssh eg.

ssh -L 5433: dev@XX.243.232.121

test connection

psql -U odoo -d  -p 5433 -h

13. Accessing odoo debugger console odoo 9 only ?

./ shell -c heximus.conf -d 


odoo-guide installing-psql-deps upgrade-pip psq-install db-denied-issue ssh-tunnel-forwaring ssh-key-add

Proudly representing Lithuania 🇱🇹 as dovydasgulbinas