How can you upgrade Odoo 11 to 14? To take advantage of the latest additions, performance improvements, security, and bug fixes, you may need to update your Odoo installation from time to time. Every year in October, as a rule, a new version of this ERP is released, so many are interested in the question of how to update the system from Odoo 11 to 14.
If you are using one of the Odoo Cloud solutions, updates are done automatically. This guide is applicable when using Odoo in your own hosting infrastructure.
Here are the key points in the software upgrade process:
- Update 1 – Installing Odoo. Refers to the process of getting the latest source code for your current Odoo Edition. For example, upgrading Odoo 11 to 14 as the latest version. This does not directly change the contents of your Odoo database in any way and can be reversed by reinstalling the previous version of the source code.
- Update 2 – Odoo database. Refers to a complex data manipulation operation in which the structure and content of your database are constantly changing to make it compatible with the new version of Odoo. This operation is irreversible and is usually done through the Odoo database update service when you decide to upgrade to a newer version of Odoo. This process is also known as “migration” because it involves moving data within the database, even if the database might end up in the same physical location after an upgrade.
Next, we will consider in more detail the entire process of transition from Odoo 11 to Odoo 14
General Process To Upgrade Odoo 11 to 14
Odoo doesn’t have an automatic database upgrade when moving between its major versions. But it seems that when upgrading from the same version, the database will adapt to the new version and will not work with previous versions.
To upgrade Odoo major versions, 2 main parts need to be upgraded:
- code: this is quite a simple part, just uninstall the old version and install the new one. On Ubuntu, you can use the apt package manager to uninstall, after that update the repository (you need to apply to Odoo Nightly builds) from 11 to 14, apt−get update, and apt−get install Odoo again. It is essential to upgrade from Odoo 11 to 14.
- database: this is the hardest part. One way is to upgrade to a paid enterprise version and just let the Odoo staff do it for you. There are also many Oddo partner companies that can help you make upgrades for a fee. In the end, you can do it yourself: the essence of self-upgrade is to use OpenUpgrade. However, there are several pitfalls in this process.
OpenUpgrade Operation
OpenUpgrade is a tool that should convert your old database to a newer version of Odoo.
Tip: the documentation may not be clear to everyone, especially if you are upgrading for the first time.
Main issue: There appears to have been a “migration script” in the past, and many online tutorials and forum posts refer to it. It no longer exists as it was removed due to too many bugs. However, this is not mentioned anywhere.
How it works now: OpenUpgrade is essentially another patched version of Odoo with a built-in migration tool. You start it in the same way as the Odoo server, point it to your database with several flags, and if everything is ok, it should update your database. This is the way to upgrade from Odoo 11 to 14.
So, this is what the general process looks like with OpenUpgrade:
- create a local backup instance. Important: you should never run updates on your live system
- install Odoo on your developer machine – not on your live system
- make sure you are using the same version of the code as on your live system, otherwise, the database will not work
- now you need to check which version is installed: apt list −a odoo (see which one is “installed”)
- download the correct version from https:⧸⧸nightly.odoo.com⧸14.0⧸nightly⧸deb⧸
- place a particular Odoo version on a target:
- download the database dump from your live system and import it into your developer instance. This can be done either through the web interface (http:⧸⧸localhost:8069⧸web⧸database⧸manager) or through the command line
- you should also transfer the file store and add-ons to your development machine. On Ubuntu, the file store is located at ⧸var⧸lib⧸odoo⧸.local⧸share⧸Odoo
- test your developer setup and make sure all your data is there and working. You may need to check if all the required applications are installed on your development server
At this point, it might be worth deactivating/uninstalling any apps you don’t actually use to avoid issues during the update.
It is recommended that you use Web Database Manager to create a duplicate of your database, called a “migration” (optional, but it is better to work with a copy).
Installing and running OpenUpgrade
Next, you need to follow these steps:
- stop Odoo service: service odoo stop
- get OpenUpgrade – git clone https:⧸⧸github.co⧸OCA⧸OpenUpgrade.git
- check out the 14.0 branch when upgrading from 11.0 to 14.0: git checkout 14.0
- install the latest version of OpenUpgradeLib (as root): sudo pip3 install −−ignore−installed git + https://github.com⧸OCA⧸openupgradelib.git@master
- run OpenUpgrade as Odoo user with the following flags
- sudo −u odoo .⧸odoo−bin −d migration −−update all −−stop−after−init −−data−dir = ⧸tmp (−d gives the name of the database, in this case called “migration”)
- set data directory to ⧸tmp if Odoo user doesn’t have write permissions to your home folder
There will probably be some bugs: “missing python packages” or “outdated versions”, even if you install the newest versions with pip3, specifically psycopg2 and sql. Ironically, while the Debian version of Odoo works fine, the OpenUpgrade version may not have everything you need. Also, when using pip to install packages, install them system-wide with Sudo, otherwise, the Odoo user won’t find them.
If all goes well, the whole process should take some minutes, giving a lot of “INFO”, and end when everything is ready. The database will now be upgraded to a later version.
Next, install Odoo v14 and then test the migrated database:
- remove odoo version 11: sudo apt-get remove odoo
- edit the repository (⧸etc⧸apt⧸sources.list.d⧸odoo.list) from 11.0 to 14.0 (it should look like deb http:⧸⧸nightly.odoo.com⧸14.0⧸nightly⧸deb⧸ .⧸)
- sudo apt−get update
- sudo apt−get install odoo
- open http:⧸⧸localhost:8069⧸web⧸database⧸manager
Your “migration” database should now display without an exclamation mark. Select it and test its work. It should now work in version 14. Be sure to test everything thoroughly before upgrading your current system and transferring the new database and files back.
Tip: If you get an error that caused none of the login-passwords to work anymore, you can reset the admin password on the database (make certain it was gotten “UPDATE 1” as confirmation):
⌗ update res⎯users set password=’test’ where login=’your⎯login⎯name’;
UPDATE 1
The whole process may take some time, but all your data will be transferred.