Install Odoo with OCA repository » History » Version 15
Olivier Bitsch, 11/17/2023 08:45 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 | rm |
||
57 | ~~~ |
||
58 | |||
59 | ~~~ |
||
60 | map $http_upgrade $connection_upgrade { |
||
61 | default upgrade; |
||
62 | '' close; |
||
63 | } |
||
64 | |||
65 | map $host $db { |
||
66 | # Use this if you want to map hostname with database |
||
67 | "~(?<vm>[\w-]*)_[\w-]*\.dev\.oniabsis\.com" $vm; |
||
68 | } |
||
69 | |||
70 | server { |
||
71 | listen 80; |
||
72 | server_name _; |
||
73 | |||
74 | add_header Content-Security-Policy upgrade-insecure-requests; |
||
75 | |||
76 | location / { |
||
77 | proxy_set_header Host $host; |
||
78 | proxy_pass http://127.0.0.1:8069; |
||
79 | proxy_http_version 1.1; |
||
80 | proxy_set_header Upgrade $http_upgrade; |
||
81 | proxy_set_header Connection $connection_upgrade; |
||
82 | add_header Content-Security-Policy upgrade-insecure-requests; |
||
83 | proxy_redirect off; |
||
84 | proxy_set_header X-Odoo-dbfilter $db; |
||
85 | } |
||
86 | } |
||
87 | 8 | Olivier Bitsch | ~~~ |