Updating Odoo 8 to Odoo 9
Currently I’m updating an odoo installation from version 8 to version 9 for a customer. In this post I will give a short introduction, on how to update the installation and most common issues I observed during the update. This post ist not complete since every odoo installation is different. First of all, there is no updater or tutorial offered by the odoo company for the community edition. The company only provides support and updates for the paid enterprise licenses. Since the database structure in odoo changed in so many fields, it is almost impossible, to update the odoo database “by hand” to version 9. The other solution, OpenUpgrade is not yet ready for the current version of the ERP system and therefore also not a possible solution. Instead, I decided to upgrade the custom developed module in a fresh odoo 9 installation. As soon as it works, I install odoo 9 with a fresh database on the server and transfer (export, then import) all the data from 8 to 9. Below is a list with possible problems and the solutions I found for them.
Custom module isn’t shown in the list of apps
In odoo 8, the user has to be a technical user to be able to change the technical settings. This type of user no longer exists in odoo 9. Instead, one has to activate the developer mode of odoo. This is done by clicking on the currently logged in user name in the upper right corner, then about and then “activate developer mode”. After this step, root / administrator users can update the list of apps. In my case I was able to search for my module using the search box in the upper right corner. Updating the list of apps is still necessary but it is more hidden than in the previous version.Using the old API
The old API is simply no longer supported in odoo 9. My module was using it in some method signatures which I had to update to the new api style, including the method decorator@api.one
and @api.multi
. All the variables, like cr
, context
, etc. still exist but have slightly different names now.
Using variable names in email templates
Somehow the use of variable names as it was before is no longer possible. I will update this part as soon as I have a solution for this.Problems with lessc
If lessc cannot be found it is most likely not installed on the server or, in my case, the symlink to nodejs was wrong. This is easy to fix withsudo ln -s /usr/local/bin/nodejs /usr/bin/node