This guide will walk you through the steps to upgrade your Odoo 13 Community Edition to Odoo 14 Community Edition using OpenUpgrade, an open-source migration tool developed by the OCA (Odoo Community Association).
Important Note: Always backup your Odoo database and files before starting the upgrade process. This is a crucial step for restoring your system to its previous state if any errors occur during the upgrade.
Step 1: Prepare Your Environment
Start by updating your system to ensure all packages are up-to-date:
sudo apt-get update && sudo apt-get upgrade -y
Step 2: Stop Odoo Service
Stop your currently running Odoo instance:
sudo service odoo-server stop
Step 3: Backup Database
Before proceeding further, export and save a copy of your Odoo database. Navigate to the database manager by entering the following URL in your web browser:
http://[your_odoo_url]/web/database/manager
From there, backup your database by clicking on the “Backup” option.
Step 4: Install Dependencies
Odoo 14 has specific dependencies that need to be installed. Use the following command:
sudo apt-get install python3-dev python3-pip build-essential wget python3-venv libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools
graph TB subgraph "Preparation" A[Backup Odoo 13] --> B[Stop Odoo Service] end subgraph "OpenUpgrade Setup" B --> C[Clone and Setup OpenUpgrade] C --> D[Install OpenUpgrade Requirements] end subgraph "Migration" D --> E[Migrate Database with OpenUpgrade] end subgraph "Odoo 14 Setup" E --> F[Download and Install Odoo 14] F --> G[Configure Odoo 14] G --> H[Start Odoo 14 Service] end
Step 5: Clone OpenUpgrade
You will be using the OpenUpgrade tool to execute the upgrade. Clone the OpenUpgrade GitHub repository into a separate directory:
cd /opt/
mkdir openupgrade
cd openupgrade
git clone https://github.com/OCA/OpenUpgrade.git
cd OpenUpgrade
git checkout 14.0
Step 6: Install OpenUpgrade Requirements
OpenUpgrade has its own set of requirements, and you need to install them using pip:
pip3 install -r requirements.txt
Also, install the latest version of openupgradelib
:
pip3 install git+https://github.com/OCA/openupgradelib.git@master#egg=openupgradelib
Step 7: Upgrade Database with OpenUpgrade
Now you can use OpenUpgrade to migrate your database to the Odoo 14 schema. Remember to replace <database>
with the name of your database:
cd /opt/openupgrade/OpenUpgrade
./odoo-bin -c /etc/odoo-server.conf -d <database> --update all --stop-after-init
Step 8: Download and Install Odoo 14
After successfully migrating the database, download and install Odoo 14. This will not interfere with the OpenUpgrade installation as they are in separate directories:
cd /opt
wget https://github.com/odoo/odoo/archive/14.0.zip
unzip 14.0.zip
cd odoo-14.0
python3 -m venv odoo14-venv
source odoo14-venv/bin/activate
pip3 install wheel
pip3 install -r requirements.txt
Step 9: Setup Odoo 14 Configuration File
Create a new configuration file for Odoo 14:
sudo nano /etc/odoo14.conf
Paste in the following configuration, replacing placeholders (inside < >
) with your details:
[options]
; This is
the password that allows database operations:
admin_passwd = <admin_password>
db_host = False
db_port = False
db_user = odoo14
db_password = False
addons_path = /opt/odoo-14.0/addons
logfile = /var/log/odoo/odoo.log
Step 10: Start Odoo 14 Service
Finally, start your Odoo 14 service:
sudo service odoo14 start
Congratulations! You should now have a running instance of Odoo 14, and your data should have been migrated from your previous Odoo 13 installation.