Project

General

Profile

Install Odoo with OCA repository » History » Version 16

Olivier Bitsch, 11/17/2023 08:46 AM

1 14 Olivier Bitsch
# Install Odoo with OCA repository
2 1 Olivier Bitsch
3 15 Olivier Bitsch
## Install Odoo
4 10 Olivier Bitsch
5 1 Olivier Bitsch
~~~
6 15 Olivier Bitsch
apt install curl gpg
7 10 Olivier Bitsch
VERSION=16.0 # Define the version you want here
8
NAME=odoo
9
KEY_URL="https://nightly.odoo.com/odoo.key"
10
APT_URL="http://nightly.odoo.com/${VERSION}/nightly/deb/ ./"
11
curl -fsSL ${KEY_URL} | gpg -o /etc/apt/trusted.gpg.d/${PACKAGE}.gpg --dearmor
12
echo "deb [signed-by=/etc/apt/trusted.gpg.d/${PACKAGE}.gpg] ${APT_URL}" > /etc/apt/sources.list.d/${NAME}.list
13
apt update
14 1 Olivier Bitsch
apt install ${PACKAGE}
15 7 Olivier Bitsch
~~~
16
17 15 Olivier Bitsch
## Add OCA repository
18 7 Olivier Bitsch
19
Create new repository file for APT with the following commands.
20
21
~~~
22 11 Olivier Bitsch
echo "deb [trusted=yes] https://projects.iabsis.com/repository/odoo-oca/debian ${VERSION} main" > /etc/apt/sources.list.d/odoo-oca.list
23 13 Olivier Bitsch
apt update
24 3 Olivier Bitsch
~~~
25 1 Olivier Bitsch
26 12 Olivier Bitsch
List all modules
27 1 Olivier Bitsch
28 3 Olivier Bitsch
~~~
29 12 Olivier Bitsch
apt search odoo-oca
30 1 Olivier Bitsch
~~~
31
32 12 Olivier Bitsch
Install all modules (probably not required for your instance).
33 1 Olivier Bitsch
34 3 Olivier Bitsch
~~~
35 12 Olivier Bitsch
apt install odoo-oca*
36 1 Olivier Bitsch
~~~
37
38 12 Olivier Bitsch
For a complete list of module, read [[List of modules]] page.
39 1 Olivier Bitsch
40 12 Olivier Bitsch
Then add the OCA path into you `/etc/odoo/odoo.conf` config file
41
42 7 Olivier Bitsch
~~~
43 12 Olivier Bitsch
addons_path = /usr/share/odoo-oca/,/usr/lib/python3/dist-packages/odoo/addons
44 7 Olivier Bitsch
~~~
45 3 Olivier Bitsch
46 1 Olivier Bitsch
Restart Odoo to care the new config file
47
48
~~~
49
systemctl restart odoo
50 15 Olivier Bitsch
~~~
51
52
## Install nginx (optionnal)
53
54
~~~
55
apt install nginx
56 16 Olivier Bitsch
rm /etc/nginx/sites-enabled/default
57
nano /etc/nginx/sites-enabled/odoo
58 15 Olivier Bitsch
~~~
59
60
~~~
61
map $http_upgrade $connection_upgrade {
62
        default upgrade;
63
        '' close;
64
    }
65
66
map $host $db {
67
   # Use this if you want to map hostname with database
68
   "~(?<vm>[\w-]*)_[\w-]*\.dev\.oniabsis\.com" $vm;
69
}
70
71
server {
72
    listen 80;
73
    server_name _;
74
75
    add_header Content-Security-Policy upgrade-insecure-requests;
76
77
    location / {
78
        proxy_set_header Host $host;
79
        proxy_pass http://127.0.0.1:8069;
80
        proxy_http_version 1.1;
81
        proxy_set_header Upgrade $http_upgrade;
82
        proxy_set_header Connection $connection_upgrade;
83
        add_header Content-Security-Policy upgrade-insecure-requests;
84
        proxy_redirect off;
85
        proxy_set_header X-Odoo-dbfilter $db;
86
    }
87
}
88 8 Olivier Bitsch
~~~