.. macos:
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 ``
|
2. Prerequisites
a) Install PostgreSQL
Install the PostgreSQL database with Homebrew, if not already done.
.. code:: bash
brew install postgresql
b) Configure PostgreSQL:
Create the username database for ``Friedrich``, otherwise ``psql`` won't run:
.. code::
createdb
c) 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.
.. code:: bash
brew install git
d) 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.
.. code:: bash
brew install node
Install ``rtlcss``.
.. code:: bash
sudo npm install -g rtlcss
e) Install wkhtmltopdf
Odoo uses wkhtmltopdf to print reports. This can not be installed using pip3.
.. code:: bash
brew install --cask wkhtmltopdf
f) venv already installed
The installation uses the already installed venv for Odoo 16 (see 1. Parameter).
|
3. Create the Instance Layout for Odoo
Change to the Instances of Odoo, here:
.. code:: bash
cd /Users/Friedrich/Documents/GoogleDrive/Project/Coremodel/Odoo/Instances/Logistics_16_Develop
Create some subdirectories:
.. code:: bash
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.
|
4. Install Odoo
Clone Odoo 16 from Git:
.. code:: bash
git clone -b 16.0 --single-branch --depth 1 https://github.com/odoo/odoo.git
Odoo will be installed in the subdirectory ``odoo``.
|
5. Script to start Odoo
Create the shell script bin/odoo:
.. code:: bash
nano bin/odoo
Content of the shell script:
.. code:: bash
#!/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:
.. code::
chmod +x bin/odoo
Generate the configuration file for the instance and initialize the database:
.. code::
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.
|
6. Configuration
Set the following settings in the configuration file:
.. code:: bash
nano logistics_16_test.cfg
a) suppress warning for longpolling_port
Set in the config file the following additional line:
.. code:: bash
longpolling_port = False
b) install no demo data in the database
Change the following setting in the config file to:
.. code:: bash
without_demo = True
|
7. 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*.
.. code:: bash
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/tem*\ p for the download of the Git repository and then move the files to *odoo/addons*.
.. code:: bash
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:
.. code:: bash
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
|
8. Start Odoo
Start Odoo by launching the shell script.
.. code:: bash
bin/odoo