Upgrading odoo 12 to odoo 13 is similar to upgrade odoo 11 to odoo 12 as written in my previous article, http://biroinfotek.com/upgrade-odoo-11-to-12-using-openupgrade/
Before start upgrading:
- Make sure all your custom modules run on odoo 13
- 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/13.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 13.0 # cd OpenUpgrade-13.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-13.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-13.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.
AttributeError: ‘website’ object has no attribute ‘social_googleplus’If you found this error. See here: https://github.com/OCA/OpenUpgrade/pull/2887
You have to remove such element inside the view before migrating, or now through any way in your migrated DB.
Go to your DB, search such of these view, and remove from Setting | Technical | View
select name, key from ir_ui_view where arch_db like ‘%social_googleplus%’;
Make sure everything fine with no errors found!
Now you can backup your upgraded database and restore it to odoo 13 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 13 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.