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