How to upgrade Odoo » History » Revision 8
Revision 7 (Olivier Bitsch, 01/18/2024 03:09 PM) → Revision 8/9 (Olivier Bitsch, 01/19/2024 10:45 AM)
# How to upgrade Odoo ## Requirements Upgrade all packages (this include odoo official package and oca packages) ``` apt update && apt upgrade ``` Identify you database name ``` sudo -u odoo psql bash -c "psql -d postgres -c '\l' '\l'" ``` ## Upgrade to a minor version (e.g 16.0.20231117 to 16.0.20231005) ``` DATABASE=<your db> sudo -u odoo bash -c "odoo -u all -c /etc/odoo/odoo.conf -d <odoo-database> --stop-after-init" ``` ## Upgrade to a major version (e.g. 15.0 to 16.0) Install the scripts ``` apt install odoo-oca-openupgrade ``` Ensure to install latest version of openupgradelib. ``` pip install --ignore-installed git+https://github.com/OCA/openupgradelib.git@master ``` Run the command ``` DATABASE=<your db> DATABASE=my-db 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'" ```