How to set up a multi-version Odoo development environment locally

Hiep Dinh
Hiep Dinh
Jan 3 · 3 min read

Sometimes, we need to develop some projects with different Odoo version. So we need to make sure that the project’s dependencies will not interfere with the dependencies of other projects that can be running a different version of Odoo or will use different third-party add-on modules, which need different versions of Python dependencies.

This article will step by step to set up a multi-version Odoo development environment locally for Ubuntu.


Dependencies need to install for this article:

Setup Databases

Docker-compose file for PostgreSQL with default database is odoo_13.

version: "3.7"
image: postgres:10.11
container_name: odoo_postgres_10_11
- "5432:5432"
- POSTGRES_DB=odoo_13
- PGDATA=/var/lib/postgresql/data/odoo
- odoo-db-data:/var/lib/postgresql/data/odoo


Run docker-compose up to create a container. Then connecting to DB and create new database odoo_12

Workspace structure

Create a workspace with structure.

├── odoo-12
│ ├── bin // Include various helper executable shell scripts
│ ├── filestore // Use as a file store
│ ├── local // Save your instance-specific add-ons (module)
│ ├── logs // Store the server log files
│ └── src // Contains the clone of Odoo itself
└── odoo-13
├── bin
├── filestore
├── local
├── logs
└── src

Setup Odoo version 13 development environment

Navigating Commandline to workspace/odoo-13 and run.

virtualenv -p python3 env 
git clone src/odoo
env/bin/pip3 install -r src/odoo/requirements.txt

Save the following shell script as bin/odoo :

ROOT=$(dirname $0)/..
$PYTHON $ODOO -c $ROOT/local.cfg "$@"
exit $?

Make the script executable:

chmod +x bin/odoo

Create a local.cfg configuration file for your instance:

addons_path = currentDir/src/odoo/odoo/addons, currentDir/src/odoo/addons, currentDir/local
data_dir = currentDir/filestore
db_host = localhost
db_user = odoo
db_password = odoo
db_name = odoo_13

Start server:

bin/odoo -i base

Setup Odoo version 12 development environment

Every step is the same as version 13. We only update route odoo-13 to odoo-12, db_name = odoo_13 to db_name = odoo_12 in local.cfg and git clone source from brand odoo 12.

git clone --depth 1 --branch 12.0 --single-branch


By isolation dependencies for every Odoo version. We will prevent the conflict when developing Odoo modules for every version locally.

I hope this article will be helpful.

Originally published at on January 3, 2020.

Hiep Dinh

Written by

Hiep Dinh


We are an offshore software development and IT consulting company based in Vietnam. Our aim is to create awesome products that will make your everyday life easier. As a start-up company, we always put humans on first priority and welcome young people to join our team

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade