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