How to upgrade Odoo » History » Version 9
Olivier Bitsch, 01/19/2024 10:46 AM
1 | 4 | Olivier Bitsch | # How to upgrade Odoo |
---|---|---|---|
2 | 1 | Olivier Bitsch | |
3 | 4 | Olivier Bitsch | ## Requirements |
4 | |||
5 | 7 | Olivier Bitsch | Upgrade all packages (this include odoo official package and oca packages) |
6 | |||
7 | ``` |
||
8 | apt update && apt upgrade |
||
9 | ``` |
||
10 | |||
11 | 4 | Olivier Bitsch | Identify you database name |
12 | |||
13 | ``` |
||
14 | 8 | Olivier Bitsch | sudo -u odoo psql -d postgres -c '\l' |
15 | 4 | Olivier Bitsch | ``` |
16 | |||
17 | ## Upgrade to a minor version (e.g 16.0.20231117 to 16.0.20231005) |
||
18 | |||
19 | 1 | Olivier Bitsch | ``` |
20 | 8 | Olivier Bitsch | DATABASE=<your db> |
21 | 9 | Olivier Bitsch | sudo -u odoo odoo -u all -c /etc/odoo/odoo.conf -d ${DATABASE} --stop-after-init |
22 | 4 | Olivier Bitsch | ``` |
23 | |||
24 | ## Upgrade to a major version (e.g. 15.0 to 16.0) |
||
25 | |||
26 | 1 | Olivier Bitsch | Install the scripts |
27 | |||
28 | 4 | Olivier Bitsch | ``` |
29 | 2 | Olivier Bitsch | apt install odoo-oca-openupgrade |
30 | 4 | Olivier Bitsch | ``` |
31 | 1 | Olivier Bitsch | |
32 | 2 | Olivier Bitsch | Ensure to install latest version of openupgradelib. |
33 | |||
34 | 4 | Olivier Bitsch | ``` |
35 | 1 | Olivier Bitsch | pip install --ignore-installed git+https://github.com/OCA/openupgradelib.git@master |
36 | 4 | Olivier Bitsch | ``` |
37 | 2 | Olivier Bitsch | |
38 | 1 | Olivier Bitsch | Run the command |
39 | |||
40 | 4 | Olivier Bitsch | ``` |
41 | 8 | Olivier Bitsch | DATABASE=<your db> |
42 | 9 | Olivier Bitsch | sudo -u odoo odoo -u all --addons-path='/usr/share/odoo-oca,/usr/lib/python3/dist-packages/odoo/addons' --upgrade-path=/usr/share/odoo-oca/openupgrade_scripts/scripts/ -d ${DATABASE} --stop-after-init --load='web,openupgrade_framework' |
43 | 4 | Olivier Bitsch | ``` |