Search code examples
pythonxmlodooerp

Update Existing Module To Newest Version in Odoo 12


We have a module that help us in reporting taxes. It is currently installed with version number 12.0.2. Now the newest version is 12.0.3. and we are about to update it manually.

Since we are using on-premise Odoo, my approach is to transfer the files using FTP to our server's custom add-on folder and upgrade it via odoo's apps menu. I did my first attempt update by making a backup of current module's folder and transfer the newest version with the same folder name, but it didn't worked.

Should i just paste the recent version files to the old folder instead and restart the service/server? or is there any proper way to update the current module to newest version?

Thank you


Solution

  • In case of module updates, don't forget a few points:

    • you should use the same folder for your addons upgrades, the best way is to use git or any similar tool
    • if your upgrade concerns XML-based stuff, just upgrade the module from Odoo's application list, but if it's code, you must restart Odoo. In rare circumstances, I have even seen older python-compiled files remain in place instead of being replaced. So most of the time I delete them
    • if you would like to test the new version before replacing the existing one, don't forget to check the order of the addons folders list: the one containing the new version must be placed before. I know this is obvious but it may happen...