macOS

See the documentation at How to Install Odoo on Mac OS.

  1. Parameter

  • Used venv: odoo_16

  • Database Name: Logistics_16_DB

  • Directory for installation: Instance Logistics_16_Develop

  • Configuration File: .logistics_16_test.cfg <https://drive.google.com/file/d/1ycNmakF740f_OO_S-8teMudv_E2vRJBe/view?usp=drive_fs>


  1. Prerequisites

  1. Install PostgreSQL

Install the PostgreSQL database with Homebrew, if not already done.

brew install postgresql
  1. Configure PostgreSQL:

Create the username database for Friedrich, otherwise psql won’t run:

createdb
  1. Install Git

macOS already comes with Git but as is with python and other libraries it’s better to leave the system ones alone and have an own versions that could be upgraded.

brew install git
  1. Install Node.js and npm

Odoo offer several languages including Arabic/Hebrew. To support these, node need to be installed. npm will be installed with Node.

brew install node

Install rtlcss.

sudo npm install -g rtlcss
  1. Install wkhtmltopdf

Odoo uses wkhtmltopdf to print reports. This can not be installed using pip3.

brew install --cask wkhtmltopdf
  1. venv already installed

The installation uses the already installed venv for Odoo 16 (see 1. Parameter).


  1. Create the Instance Layout for Odoo

Change to the Instances of Odoo, here:

cd /Users/Friedrich/Documents/GoogleDrive/Project/Coremodel/Odoo/Instances/Logistics_16_Develop

Create some subdirectories:

mkdir local bin data logs

The functions of the subdirectories are as follows:

  • local/: This is used to save the instance-specific add-ons.

  • bin/: This includes various helper executable shell scripts.

  • data/: This is used as a file store.

  • logs/ (optional): This is used to store the server log files.


  1. Install Odoo

Clone Odoo 16 from Git:

git clone -b 16.0 --single-branch --depth 1 https://github.com/odoo/odoo.git

Odoo will be installed in the subdirectory odoo.


  1. Script to start Odoo

Create the shell script bin/odoo:

nano bin/odoo

Content of the shell script:

#!/bin/sh
root=$(dirname "$0")/..
python=/Users/Friedrich/Documents/GoogleDrive/Project/Development/Python/venv/odoo_16/bin/python3
odoo=$root/odoo/odoo-bin
"$python" "$odoo" "-c" "$root/logistics_16_test.cfg" "$@"

Make the script executable:

chmod +x bin/odoo

Generate the configuration file for the instance and initialize the database:

bin/odoo --without-demo=True --stop-after-init --addons-path=odoo/addons --data-dir /Users/Friedrich/Documents/Logistics/Odoo/Instances/Logistics_16_Develop/data -d Logistics_16_DB --save --config=logistics_16_test.cfg

The configuration file has the name .logistics_16_test_cfg. The database Logistics_16_DB will be attached to this installation. By parameter –without-demo no demo data will be loaded (see Command-line interface)

See Configuring Odoo for more details to the configuration file.


  1. Configuration

Set the following settings in the configuration file:

nano logistics_16_test.cfg
  1. suppress warning for longpolling_port

Set in the config file the following additional line:

longpolling_port = False
  1. install no demo data in the database

Change the following setting in the config file to:

without_demo = True

  1. Install additional modules

Install the module Odoo 16 Accounting from Git to the subdirectory odoo/addons. This is realized via the temporary directory local/temp for the download of the Git repository and than move the files to odoo/addons.

git clone -b 16.0 --single-branch --depth 1 https://github.com/odoomates/odooapps.git local/temp
mv local/temp/* odoo/addons
rm -rf local/temp

Install the module OpenUpgrade from Git to the subdirectory odoo/addons. This is realized via the temporary directory local/temp for the download of the Git repository and then move the files to odoo/addons.

git clone -b 16.0 --single-branch --depth 1 https://github.com/OCA/OpenUpgrade.git local/temp
mv local/temp/* odoo/addons
rm -rf local/temp

Activate additional apps in Odoo:

bin/odoo -c logistics_16_test.cfg -i account,product,stock,purchase,hr,crm --stop-after-init
bin/odoo -c logistics_16_test.cfg -i aproject,mail,board,note --stop-after-init
bin/odoo -c logistics_16_test.cfg -i sale_management --stop-after-init
bin/odoo -c logistics_16_test.cfg -i appointment --stop-after-init
bin/odoo -c logistics_16_test.cfg -i l10n_ch --stop-after-init
bin/odoo -c logistics_16_test.cfg -i sale --stop-after-init
bin/odoo -c logistics_16_test.cfg -i account_accountant --stop-after-init
bin/odoo -c logistics_16_test.cfg -i om_account_accountant --stop-after-init
bin/odoo -c logistics_16_test.cfg -i sale_subscription --stop-after-init

  1. Start Odoo

Start Odoo by launching the shell script.

bin/odoo