How to Install Odoo 15 on MacOS

What is Odoo?

Odoo is an ERP Application which started in 2005 as TinyERP. After three years, the name was changed to OpenERP and finally in 2014 the renamed it as Odoo. It is a suite of open source business apps that cover all your company needs which includes CRM, eCommerce, accounting, inventory, point of sale, project management, etc. There are two editions of Odoo, Enterprise Edition (Paid) and Community Edition (Free). Enterprise edition is built from community edition.

Why you should use Odoo?

  • It is open source which means it is free
  • It has more than 25+ Free Modules
  • It uses Model-View-Controller (MVC Architecture)
  • Use Python as main programming language
  • Use Bootstrap CSS Framework
  • Integration to other technologies like mobile apps
  • Many Odoo community online
  • Free Apps and Themes

Application used in running Odoo

Before you can run Odoo, you need to install Git, Python / Pip, PostgreSQL, PG Admin 4 and NodeJS. We will install PyCharm Community Edition as our IDE. Finally, we need any browser like Chrome, Firefox, Safari, etc.

Install Git

We will use git commands to get the code of Odoo 15 community edition into our machine. To install git, copy the commands below and use terminal in your Mac. We will use HomeBrew so be sure to install it. Try these youtube videos if you have issues installing HomeBrew Open Install Homebrew.

Now install git using the command below:

Download Odoo 15 Community Edition

Using git command, copy the code of Odoo 15 community edition from GitHub Open https://github.com/odoo/odoo. But before you do that, create the folder you want to save Odoo community. Let say we save it in this directory "/Users/macbookpro/tutorials/odoo/v15/odoo-server". Take note that macbookpro will be your Mac username.

Open your terminal and go inside that directory by using terminal. Type cd and click and drag odoo-server folder.

Open Terminal

Copy the git command below, paste on your terminal and hit enter. It will take a little bit in copying the files depending on your internet speed.

Install Python

Odoo is using Python as the main programming language. To install Python, go to Python website Open https://www.python.org/downloads/macos/https://www.python.org/downloads/macos/ and select version higher than 3.7. In this tutorial, I will be using Python v3.8.0 Open Download Python v3.8.0. Go at the bottom and select Open macOS 64-bit installermacOS 64-bit installer. Kindly check this tutorial if you are having trouble installing it.

After installation, check your python version below. Take note that MacOS has default Python2.7 installed already.

By default, if you install python, Open pip3pip3 will also be installed. We will use pip3 to download python packages needed for Odoo to run. If you know ReactJS, this is the same as npm. To check Odoo python packages, open Requirements.txt in odoo-server folder.

To check pip3 version, type the code below in terminal:

Install PostgreSQL and pgAdmin 4

To download PostgreSQL, go to their website Open https://www.postgresql.org/download/https://www.postgresql.org/download/ and choose the operating system you will use. In this tutorial, we will be using macOS so choose macOS.

download PostgreSQL

There are several options how you will download PostgreSQL, select Postgress.app since this is a native macOS app. If you choose this option, you will be redirected to their website Open https://postgresapp.com/https://postgresapp.com/.

Go to Downloads and select installer with current or different versions. If you want to use other versions, choose Postgres.app with all currently supported versions (Universal/Intel).

Postgres.App Versions

In order to easily manage and access PostgreSQL, we need to install pgAdmin 4. Go to Open https://www.pgadmin.org/download/https://www.pgadmin.org/download/ to download pgAdmin 4, select the operating system and choose macOS.

Install Odoo Python Dependencies

In installing Odoo python dependencies, we need pip3. When installing python, pip3 will be automatically installed. To see all python dependencies, go to Open https://pypi.org/https://pypi.org/. To see all Odoo python dependencies, go inside odoo-server directory and open requirements.txt.

It is recommended to use virtual environment so that your python module packages will not be mixed up with other Odoo instances or python versions. To create virtual environment, first go to "/Users/macbookpro/tutorials/odoo/v15" by typing cd in terminal, then click and drag v15 folder and hit enter.

Install Odoo Python Dependencies

Next, run the code below:

After running the above code, a new folder odoo_venv will be created.

Install Odoo Python Dependencies

Next, activate the virtual environment by running the code below:

Install the python module packages by running the code below. Wait until all dependencies will be installed.

Install wkhtmltopdf

Odoo uses wkhtmltopdf to print reports. This can not be installed using pip3. To download separately, go to Open https://wkhtmltopdf.org/downloads.htmlhttps://wkhtmltopdf.org/downloads.html and select macOS operating system.

Install NodeJS

Odoo offer several languages including Arabic/Hebrew. To support these, we need to install rtlcss using npm. To use npm, we need to install NodeJS. Go to Open https://nodejs.org/en/https://nodejs.org/en/ and download version LTS (Long Term Support).

Run the below code in terminal:

Running Odoo 15

Now that all the applications needed are successfully installed, instead of using command-line, we will be using PyCharm community. But before that, make sure the PostgreSQL is running.

Running PostgreSQL

Create new database user

For security reason, we can not use default postgres user. To create a new user, open pgAdmin 4. For first time use, it might ask for password.

Go to Servers -> Localhost and right Login/Group Roles and select Create -> Login/Group Role...

Create new postgres database user

In General, type the name. Next add the password in definition. Lastly, under privileges, toggle Can Login and Create Databases. Click Save.

Create new postgres user priviledge

Install and Setup PyCharm and Odoo Configuration

First, create a new folder under "Users/macbookpro/tutorials/v15" and name it your_home since this will be the theme that we will create.

Create new project

Download PyCharm community edition on this link Open https://www.jetbrains.com/pycharm/download/#section=mac. Once downloaded, open PyCharm and choose Open and select the folder you created "your_home".

PyCharm Open Project

By default, PyCharm will automatically create a new file main.py. Right click on the file and click delete. Inside you_home folder, create Odoo configuration by creating a new file odoo.conf. Copy and paste the following code:

Add virtual environment by going in PyCharm -> Preferences -> Project -> Python Interpreter. Check the link of current python interpreter and if this is not the one you created under "Users/macbookpro/tutorial/odoo/v15/odoo_venv, then click gear icon on the right side and click Add.

Python Virtual Environmant

Select Existing Environment and locate python3 file which is located inside "odoo_venv/bin/python3". Click apply and okay button.

Python Virtual Environmant

Edit PyCharm configuration by clicking on the menu bar. By default, it will create a new configuration "main". Click main click minus (-) button on top left to delete.

PyCharm Edit Configuration

Click plus (+) button to add new and choose Python. Copy the code below for the script path and parameters. Note, replace the code based on the location of your file. Click apply and OK.

PyCharm Odoo Configuration

Run Odoo by clicking green arrow in the toolbar.

PyCharm Run Odoo

Go to the browser on type url http://localhost:8069. You will be redirected to http://localhost:8069/web/database/manager since there's no database yet created.

Odoo Manage Database

Now that you have successfully run Odoo, let's create a new database. The master password is the one you added in odoo.conf under admin_passwd which is 12345.

Odoo Create New Database

Click Create Database. You will notice in PyCharm log file that database and tables are being created. To verify if it is successful, go to pgAdmin 4, right click to databases and click refresh.

Install Odoo Website Module

Going back to Odoo in the browser, you will be automatically redirected to Apps module. Search website and click install.

Odoo Install Wesbite Module

You will be redirected to website configurator http://localhost:8069/website/configurator. But since we will build a theme from scratch, click the link on the bottom right corner.

Odoo website configurator

Since we did not added any theme yet, you will only see the default theme of Odoo. Hover to the theme and click Use these theme. It will take some time to install then you will be automatically redirected to the website home page.

Odoo website using default theme

Congratulations! You have successfully installed and run Odoo 15. For more details, kindly watch video below.

How to Install Odoo 15 on MacOS