Skip to Content
Menu
This question has been flagged

I need to upgrade a database from Odoo 15 to 17, and there are some modules that used analytic accounts and analytic tags, which in versions 16 and 17 have been transformed into distributions. For this, I need to create a script that updates these values so that they are not simply deleted.

I have seen that many people use OpenUpgrade, but I am not sure if it is used for upgrades on Odoo.sh. It would be good to know how I can upgrade these modules, especially if there is an example related to the analytic part.

Avatar
Discard
Best Answer

1. Update the Manifest File

  • Change the version key to match the target Odoo version (e.g., 17.0.1.0.0).
  • Update the depends list if any dependency versions have changed.

2. Refactor Python Code

  • Replace deprecated APIs (e.g., use models.Model, api.model_create_multi for record creation in v17+).
  • Check for changes in core model field names or method signatures.

3. Adjust XML Views

  • Use xpath rather than full view overrides.
  • Update view inheritance if parent views have changed (check Odoo's GitHub for view XML ID differences).

4. Migrate Security & Data Files

  • Update ir.model.access.csv to reflect any new model names.
  • Ensure data files still match current model field structure.

5. Update Git Branch in Odoo.sh

  • Create a new branch (e.g., odoo-17-upgrade) with updated module code.
  • Push to the associated repository.
  • In Odoo.sh, link the branch to a new staging environment running the target Odoo version.

6. Test Everything

  • Deploy to staging in Odoo.sh.
  • Perform UAT (User Acceptance Testing) and automated tests if available.

7. Finalize & Deploy

  • Once validated, promote the staging branch to production.


Avatar
Discard
Related Posts Replies Views Activity
2
Jun 24
1666
1
Mar 25
2301
3
Mar 25
951
0
Oct 23
2749
1
Apr 22
3618