Upgrading odoo 11 to odoo 12 has different methodology than upgrade odoo 10 to odoo 11 as written in my previous article, http://biroinfotek.com/odoo-upgrade-10-to-11-using-openupgrade/
Before start upgrading:
- Make sure all your custom modules run on odoo 12
- Create development environment and make copy of your production database
- Restore your production database to development environment
- Upgrading process happen in the development environment
Create openupgrade directory
# mkdir openupgrade # cd openupgrade
Download OpenUpgrade source
# wget https://codeload.github.com/OCA/OpenUpgrade/zip/12.0 or via git # sudo apt install git # git --version # git clone https://github.com/OCA/OpenUpgrade.git Install unzip, if you dont have it: # sudo apt install unzip Unzip OpenUpgrade source: # unzip 12.0 # cd OpenUpgrade-12.0/
ModuleNotFoundError: No module named ‘openupgradelib’If you found this error
# pip3 install git+git://github.com/OCA/openupgradelib.git
UserWarning: The psycopg2 wheel package will be renamed from release 2.8If you found this error
# pip3 install psycopg2-binary
Remember, run all these steps on your development environment!
Make sure odoo-server not running # sudo service odoo-server stop
Edit the configuration files and point addons to the OpenUpgrade addons source code # sudo nano /etc/odoo-server.conf --start-- addons_path=/home/myfolder/openupgrade/OpenUpgrade-12.0/addons --end--
Run ./odoo-bin point to the database you want to upgrade, and add the --update all --stop-after-init flags Go to odoo-bin path: # cd /home/myfolder/openupgrade/OpenUpgrade-12.0 Sign in as odoo user: # sudo su odoo Here is the upgrade syntax: # ./odoo-bin --database=yourDB --config=/etc/odoo-server.conf --update all --stop-after-init See logs in another terminal: # tail -f /var/log/odoo-server.log Upgrade process takes time, depending on your DB size, make some coffee while you monitor the errors.
Make sure everything fine with no errors found.
Now you can backup your upgraded database and restore it to odoo 12 production environment.
At last, when migration through OpenUpgrade is completed, you may need to make another complete update (with –update=all parameter passed to the server) with last Odoo official version. See here https://doc.therp.nl/openupgrade/after_migration.html
Do these in odoo 12 production environment Go to odoo-bin path: # cd /odoo/odoo-server/ Sign in as odoo user: # sudo su odoo Here is the update syntax: # ./odoo-bin --database=yourDB --config=/etc/odoo-server.conf --update all --stop-after-init
That’s it. Hope it helps.