Odoo is the most popular and fastest-growing ERP in the market. Every release in Odoo comes up with incredible features and improvements. Specially Odoo13 comes up with lots of improvements like better user interface, better efficiency, and reporting, etc.
Here, if you are using the old version and you want to take advantage of new features then you have to upgrade it to the new version.
While upgrading Odoo you have to consider two scenarios: Code Migration & Database Migration
Before proceeding with data migration, you have to do the code migration. In this blog, you will learn how we can help you to upgrade your module’s code from previous version to Odoo13
You will face some error or traceback after restarting Odoo 13 service with your old version modules. So, You need to take care of the following changes while Odoo code upgrade:
Python files:
Version Description:
Change the module version from old to new. Here we are moving odoo12 to odoo13 so we will change the module by specific format 13.0.1.0.0
(13.0) main Odoo version
(1.0.0 - p.q.r) Here p stands for if any change in model or view, q stands for up-gradation, and r stands for bug fixes release
Deprecated Decorators: All the decorators removed like @api.multi, @api.returns, @api.one, @api.cr, and @api.model_cr as they are no longer available in V13. Multi records handled by default now.
You will get a traceback related to the decorator while installing your old module. Ex: For @api.multi decorator, you will get below traceback.
“ AttributeError: module 'odoo.api' has no attribute 'multi' “
Structural Changes in Models: Some models have been changed or merged in the latest version. There are few structural changes detected in the V13 modules like accounting, stock, etc. Therefore this step requires analysis to check compatibility with the migration version to find out the efforts.
Field level changes:
Some of the attributes have been changed/deprecated at the field level like oldname, tracking, etc. If you have the need for those fields, create a migration script, and use openupgradelib's methods.
Check out all "compute" methods of non-computed compute fields that assign values ??to any condition, even if it is a false one.
Don’t rely on any expected default values as the computed stored fields will keep their previous value if not assigned during the calculation method.
XML files:
Changes in Views:
As mentioned above, some model’s structure has been changed so its respective views also changed.
View type is deprecated in the latest versions, so there is no need for a view type tag on the action window XML definition. It is by default “form”.
Also, you have to remove some deprecated attributes while declaring views.
There are some changes in FA (Font Awesome) icon names in FA V5 so you have to make the changes accordingly. Make sure all front-end classes have been changed for the Front-end. Ex:calendar-check-o to calendar-check
Javascript files: As per the odoo13 version, some changes also take place in javascript in terms of syntax, elements, and their uses. Please make sure that to address them while doing needed module code upgrade.
At last, Understand the functionality of the module in the previous version and ensure that this functionality also works in the upgraded version of the module. Also, add Automated Tests for better code coverage.
Did you find this blog post helpful? Check out our other blog to know about the features of Odoo V13.
Do you want to upgrade your Odoo to the latest version? Do you want to migrate code and database? Give us a call or email to know more.
We use cookies to deliver personalized content, analyze trends, administer the site, track user movements on the site, and collect demographic information about our user base as a whole. Accept all cookies for the best possible experience on our website or manage your preferences.
What For?