How to install OCA modules

One of the greatest barrier to the contributors or end users is how to get started with Odoo and how to easily install the OCA module and test them.

This document intends to inventory some simple ways for the users to install OCA modules from the official OCA Github repository

 

Installing Odoo

(The Linux native way)

Let's say that you want to install the modules Business Requirements available here for version 10.9.

The standard Odoo installation how-to should be able to get you a standard Odoo server running in a Linux box.

Once Odoo installed, you can use the following methods to install the OCA modules in your Odoo server.

Using git

The most common way to install a module is to clone the git repository in your server and add the directory to your `odoo.conf` file:

1. Clone the git repository

cd your-addons-path
git clone https://github.com/OCA/business-requirement
cd business-requirement
git checkout 10.0 #for the version 10.0: adapt according to desired version

2. Update the addon path in your `odoo.conf` file

3. Restart Odoo

4. Update the addons list in your database (Menu `Apps > Update Apps List` in developer mode)

5. Install the `Business Requirements` modules in menu `Apps`.

Using pip

An easy way to install it with all its dependencies is using pip:

1. Recover the code from pip repository

pip install --pre odoo10-addon-business_requirement odoo-autodiscover

2. Restart Odoo

3. Update the addons list in your database (Menu `Apps > Update Apps List` in developer mode)

4. Install the `Business Requirements` modules in menu `Apps`.

Installing Odoo (2)

(The Docker way)

If you do not have any Odoo server installed in your server, you can start your own Odoo in few minutes via Docker in command line. There are multiple advantages of this method, one of which is to "containerize" the Odoo server. With this method, the Odoo server is contained in one virtual environment (Docker) and do not impact the rest of the server.

This method is very practical, quick and safe for simple tests (although of course you can run full production server under Docker too!).

Here is the basic how-to (based on https://github.com/Elico-Corp/odoo-docker), valid for Ubuntu OS but could also easily be replicated in MacOS or Windows:

1. Install docker and docker-compose in your system

2. Create the directory structure (assuming the base install directory will be `odoo`)

mkdir odoo && cd odoo
mkdir -p ./volumes/postgres ./volumes/odoo/addons ./volumes/odoo/filestore \
./volumes/odoo/sessions

3. Create a `docker-compose.yml` file in `odoo` directory with following content: 

 version: '3.3'
services:
postgres:
image: postgres:9.5
volumes:
- ./volumes/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=odoo
odoo:
image: elicocorp/odoo:10.0
command: start
ports:
- 127.0.0.1:8069:8069
volumes:
- ./volumes/odoo/addons:/opt/odoo/additional_addons
- ./volumes/odoo/filestore:/opt/odoo/data/filestore
- ./volumes/odoo/sessions:/opt/odoo/data/sessions
links:
- postgres:db
environment:
- ADDONS_REPO=https://github.com/OCA/business-requirement.git
- ODOO_DB_USER=odoo

4. Fire up your container (in `odoo` directory)

 docker-compose up -d odoo

5. Open a web browser and navigate the URL you have set up in your `docker-compose.yml` file (http://127.0.0.1:8069 in this particular example)

6. Create a new database

7. Update the addons list in your database (Menu `Apps > Update Apps List` in developer mode)

8. Install the `Business Requirements` modules in menu `Apps`.

You can improve your new Odoo docker environment (add parameters, change default passwords etc.) following this documentation.

Leave a comment

You must be logged in to post a comment.