0% found this document useful (0 votes)
45 views5 pages

Odoo Migration - Tri Nanda

Odoo migration - Tri Nanda

Uploaded by

Cicilia Cicilia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views5 pages

Odoo Migration - Tri Nanda

Odoo migration - Tri Nanda

Uploaded by

Cicilia Cicilia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Odoo Migration

Writer: Tri Nanda


Email: [email protected]
Telegram: @da_ti
WhatsApp: +62-822-6181-9233
Introduction:
Odoo is an open source ERP software that helps manage businesses. If you're
currently using an older version of Odoo, you might want to migrate to a newer
version to take advantage of new features and improvements. In this
documentation, we'll walk you through the steps to migrate from Odoo 14
community edition to Odoo 16 community edition on a Linux environment.

Pre-requirements:
Before starting the migration process, make sure you have the following:
● Odoo 14, 15, and 16 community edition instances installed on your Linux
environment.
● A PostgreSQL user account for the migration process.
● OpenUpgrade: A tool used to upgrade Odoo instances from one major
version to another. You can download or clone it from this repository:
https://github.com/OCA/OpenUpgrade.
● openupgradelib: A Python library required for the migration process. You
can install it later on in the steps section.

The steps on Odoo 14 section:


1. Backup your Odoo 14 database: Before beginning the migration process,
it's important to back up your existing Odoo 14 database so that you can
restore it if anything goes wrong during the migration process. You can
use the Odoo backup functionality to create a backup of your database.
2. Create a configuration file: odoo_migration.conf and add the following
information:
[options]
; This is the password that allows database operations:
admin_passwd = 123
db_host = 127.0.0.1
db_port = 5432
db_user = upgrade_user
db_password = 123
addons_path = /opt/odoo/odoo15/odoo/addons,
/opt/odoo/odoo15/odoo/odoo/addons,
/opt/odoo/migration/OpenUpgrade
Things to note is about the addons_path, if we will do migration from
v14 to v15, it should point to the addons of Odoo 15 and the
OpenUpgrade git current branch should also be 15. The initial step that
we are doing now is migrate Odoo 14 to the Odoo 15, so we must set the
addons_path to the Odoo and OpenUpgrade version 15. To make sure
the OpenUpgrade already on the correct branch, we can run the git
branch command, make sure the current branch is 15.0. If the current
branch is not 15.0, just use the git checkout 15.0 command.
3. Now go to the Odoo 15 folder location. And if you are using a virtual
environment such as Conda or virtualenv, activate the environment and
install the latest version of openupgradelib:
pip3 install
git+https://github.com/OCA/openupgradelib.git@master#egg=o
penupgradelib
4. After all of the configuration is set, now run the following command in
your console:
./odoo-bin -c /opt/odoo/migration/odoo_migration.conf
--database=your_database_name
--upgrade-path=/opt/odoo/migration/OpenUpgrade/openupgrade
_scripts/scripts --load=base,web,openupgrade_framework
--update all --stop-after-init

Note: Replace "your_database_name" with the name of the database


you want to migrate. And to avoid redundancies, make sure to use the
odoo-bin file within the folder containing the Odoo 15 source code.

The steps on Odoo 15 section:


In these steps assume that the migration from Odoo 14 to Odoo 15 was
successful. Once you have confirmed that all data has been migrated
successfully, you can proceed to migrate to Odoo 16 by following the steps
below:

1. Edit the odoo_migration.conf file to update the addons_path to point to


the Odoo 16 addons folder and the OpenUpgrade git branch version
16.0, using the git checkout 16.0 command. The updated
configuration should look like this:

[options]
; This is the password that allows database operations:
admin_passwd = 123
db_host = 127.0.0.1
db_port = 5432
db_user = upgrade_user
db_password = 123
addons_path = /opt/odoo/odoo16/odoo/addons,
/opt/odoo/odoo16/odoo/odoo/addons,
/opt/odoo/migration/OpenUpgrade

If we pay attention to the configuration above, we only change the


addons version, which is from version 15 to 16. As we already explained,
if we will do migration from v14 to v15, it should point to the addons of
Odoo 15 and the OpenUpgrade git branch also to the v15, so because
now we will do migration from Odoo 15 to the Odoo 16, point the
addons_path to the Odoo 16 addons folder and the OpenUpgrade git
branch version 16.0, use the git checkout 16.0 command.
2. Go to the Odoo 16 folder location. And if you are using a virtual
environment such as Conda or virtualenv, activate the environment and
install the latest version of openupgradelib:
pip3 install
git+https://github.com/OCA/openupgradelib.git@master#egg=o
penupgradelib
3. Run the migration command as before:
./odoo-bin -c /opt/odoo/migration/odoo_migration.conf
--database=your_database_name
--upgrade-path=/opt/odoo/migration/OpenUpgrade/openupgrade
_scripts/scripts --load=base,web,openupgrade_framework
--update all --stop-after-init

The steps on Odoo 16 section:


Once the migration process has completed, it is important to thoroughly test the

migrated database to ensure that all data has been migrated correctly and that

the system is functioning as expected.

You might also like