I have recently setup Odoo 9.0 in a fair amount of places, including inside Linux and Windows boxes and VMs on the Cloud, Docker, as well as on my local OSX computer. There were 1-2 tricks that I would like to keep documented lest I should forget in the future.

Odoo Ingredient List

Odoo was written in Python and it’s based on PostgreSQL. Its UI is transformed using ‘less’ processor which can be installed using Node’s NPM. So, first things first, make sure Python 2.7.9+ and Node.js are installed but beware of the Python 3.X versions.

Here’s the list of binaries that you may need to download and install:

Installation Sequence

Now you may close the browser and focus on the Terminal:

  • Command + Space to open the Finder, and look for SQL Shell (psql)
  • Create an odoo user for Odoo to connect to the database:

Now that the database is setup, let us create a Python environment for Odoo, and install its dependencies.

export PATH=$PATH:/Library/PostgreSQL/9.5/bin # example
sudo python get-pip.py 
pip install -U pip setup tools virtualenv
brew install --upgrade openssl
brew unlink openssl && brew link openssl --force
virtualenv odoo9
cd odoo9    # assuming Odoo9 source code exists inside
source bin/activate
sudo -H pip install -r requirements.txt --upgrade
sudo npm install -g less less-plugin-clean-css 
python odoo.py -r odoouser -w odoouser --db_host localhost

That’s it. Odoo 9.0 should be running at now. However, always make sure that you source bin/activate before running Odoo, otherwise, it will try to run outside of the environment that we have created for it.

Note: If you find this a hassle, the entire process was simply replaced by an odoo9 command if you use docker-scripts.