How to upgrade Odoo » History » Version 5
Olivier Bitsch, 01/12/2024 12:35 PM
1 | 4 | Olivier Bitsch | # How to upgrade Odoo |
---|---|---|---|
2 | 1 | Olivier Bitsch | |
3 | 4 | Olivier Bitsch | ## Requirements |
4 | |||
5 | Identify you database name |
||
6 | |||
7 | ``` |
||
8 | sudo -u odoo bash -c "psql -d postgres -c '\l'" |
||
9 | ``` |
||
10 | |||
11 | ## Upgrade to a minor version (e.g 16.0.20231117 to 16.0.20231005) |
||
12 | |||
13 | ``` |
||
14 | sudo -u odoo bash -c "odoo -u all -c /etc/odoo/odoo.conf -d <odoo-database> --stop-after-init" |
||
15 | ``` |
||
16 | |||
17 | ## Upgrade to a major version (e.g. 15.0 to 16.0) |
||
18 | |||
19 | 1 | Olivier Bitsch | Install the scripts |
20 | |||
21 | 4 | Olivier Bitsch | ``` |
22 | 2 | Olivier Bitsch | apt install odoo-oca-openupgrade |
23 | 4 | Olivier Bitsch | ``` |
24 | 1 | Olivier Bitsch | |
25 | 2 | Olivier Bitsch | Ensure to install latest version of openupgradelib. |
26 | |||
27 | 4 | Olivier Bitsch | ``` |
28 | 1 | Olivier Bitsch | pip install --ignore-installed git+https://github.com/OCA/openupgradelib.git@master |
29 | 4 | Olivier Bitsch | ``` |
30 | 2 | Olivier Bitsch | |
31 | 1 | Olivier Bitsch | Run the command |
32 | |||
33 | 4 | Olivier Bitsch | ``` |
34 | 5 | Olivier Bitsch | DATABASE=my-db |
35 | sudo -u odoo bash -c "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' |
||
36 | 4 | Olivier Bitsch | ``` |