Skip to content
Odoo Migration

Odoo Migration: Migrating Custom Reports and Dashboards to New Versions

A practical guide for migrating custom Odoo reports and dashboards during version upgrades, covering dependency analysis, code refactoring, testing, and validation strategies to ensure data accuracy and operational continuity.

8 min readSysGenPro Editorial
Odoo Migration: Migrating Custom Reports and Dashboards to New Versions

Migrating Custom Odoo Reports Requires Code Refactoring and Rigorous Validation

Migrating custom reports and dashboards in Odoo is not an automatic process; it requires manual code refactoring, dependency analysis, and rigorous validation to ensure data accuracy. Unlike standard modules, custom reporting logic often relies on specific Python APIs, QWeb templates, and database views that may change between versions. The primary risk is silent data discrepancies where reports render without errors but display incorrect figures due to changed model fields or deprecated calculation methods. To mitigate this, organizations must treat reporting migration as a critical path item, not an afterthought. The recommended approach involves a phased strategy: first, audit all custom reporting modules for deprecated API usage; second, refactor code in a staging environment; third, perform line-by-line data reconciliation against the source system; and finally, execute user acceptance testing with real business scenarios. This process protects financial integrity and operational visibility during the upgrade.

Assessing Source and Target Version Compatibility

Before touching any code, you must establish the compatibility landscape between your source and target Odoo versions. Odoo releases introduce breaking changes in core models, ORM methods, and reporting frameworks. For example, the transition from older versions to newer ones may involve changes in how `ir.actions.report` is defined or how QWeb templates inherit from base views. You must verify the official release notes for both the source and target versions to identify deprecated methods. Pay special attention to changes in the `report` module, `web` module, and any third-party BI add-ons. If you are using Enterprise features like the Studio or specific BI widgets, confirm their support status in the target version. Do not assume that a module marked as 'compatible' in the community store will work without modification if it relies on custom code. Create a compatibility matrix that lists every custom report, its dependencies, and the specific API changes that affect it. This matrix serves as the foundation for your development plan and risk assessment.

Dependency Analysis and Code Audit

Custom reports are rarely standalone; they depend on other modules, database views, and security rules. A thorough dependency analysis is required to map these relationships. Start by identifying all Python classes that inherit from `report` or `ir.actions.report`. Check for direct SQL queries, as these are highly susceptible to schema changes. Next, analyze the QWeb templates. Look for hardcoded field names that may have been renamed or removed in the target version. For instance, if a field in the `account.move` model is renamed, any report referencing the old name will fail or return null values. Additionally, review security rules. If a report is restricted to specific user groups, ensure those groups still exist and have the correct permissions in the new version. Use static code analysis tools to scan for deprecated API calls. This audit should produce a list of 'high-risk' reports that require significant refactoring and 'low-risk' reports that may only need minor adjustments. Assign ownership for each report to a specific developer to ensure accountability.

ComponentRisk LevelCommon IssuesMitigation Strategy
Python Report LogicHighDeprecated ORM methods, changed model fieldsRefactor code, update field references, add unit tests
QWeb TemplatesMediumInheritance conflicts, removed CSS classesReview template inheritance, test rendering in staging
Database ViewsHighSchema changes, column renamesRecreate views, validate SQL syntax, check permissions
Security RulesMediumGroup renames, permission changesAudit access rights, test with different user roles
Third-Party Add-onsHighVendor support gaps, API incompatibilityContact vendor for updated version, plan for custom fix

Refactoring Custom Report Code

Once the audit is complete, begin refactoring the code in a dedicated staging environment. This environment should mirror the production database structure and data volume as closely as possible. Start with the Python logic. Replace deprecated methods with their modern equivalents. For example, if you are using an older version of the ORM, update the `search` and `read` methods to align with the new version's syntax. Ensure that all calculations are performed in Python rather than in raw SQL where possible, as this improves maintainability and reduces the risk of schema-related errors. Next, update the QWeb templates. Check for any changes in the base template structure. If you are using custom CSS or JavaScript, ensure that these assets are compatible with the new web client. For dashboards, verify that the widgets you are using are supported in the target version. If a widget is no longer available, you may need to rebuild the dashboard using alternative components or custom code. Document all changes in your version control system with clear commit messages explaining the reason for each modification.

Testing Strategy for Reporting Accuracy

Testing is the most critical phase of the migration. You cannot rely on visual inspection alone; you must perform data reconciliation. Create a set of test cases that cover all major report types, including financial statements, operational dashboards, and ad-hoc reports. For each test case, generate the report in the source system and the target system using the same date range and filters. Compare the output line by line. Any discrepancy, no matter how small, must be investigated and resolved. Pay special attention to rounding differences, currency conversions, and tax calculations. These are common sources of error in ERP migrations. Additionally, test the reports under different user roles to ensure that security rules are functioning correctly. A report that is visible to an administrator should not be visible to a standard user if it contains sensitive data. Perform performance testing as well. Large reports can become slow if the underlying database queries are not optimized. Use database profiling tools to identify slow queries and optimize them if necessary. Finally, conduct user acceptance testing (UAT) with key business users. They should validate that the reports meet their business needs and that the data is accurate.

Handling Third-Party Add-ons and BI Tools

Many organizations use third-party add-ons for advanced reporting and business intelligence. These add-ons may not be immediately compatible with the new Odoo version. Contact the vendor to confirm if an updated version is available for your target release. If the vendor does not provide an update, you may need to fork the code and maintain it yourself, which adds to your technical debt. Alternatively, you may need to replace the add-on with a native Odoo feature or a different third-party solution. If you are using external BI tools that connect to Odoo via API or database, ensure that the connection strings and authentication methods are updated. Test the data flow from Odoo to the BI tool to ensure that all data is transferred correctly. Monitor the BI tool for any errors or data gaps during the testing phase. If you are using Odoo's built-in BI features, verify that the data models and charts are correctly mapped to the new version's data structure. This may require reconfiguring the BI dashboard to reflect any changes in the underlying data.

Deployment and Cutover Planning

Once testing is complete and all discrepancies are resolved, you can proceed to deployment. Plan the cutover carefully to minimize downtime. Schedule the migration during a low-activity period, such as a weekend or holiday. Before the cutover, take a full backup of the production database and verify that the backup can be restored. This is your rollback plan. During the cutover, apply the code changes to the production environment. Run the database upgrade scripts. Then, perform a final smoke test of the critical reports. Verify that the reports are generating correctly and that the data is accurate. If any issues are found, trigger the rollback plan immediately. Do not attempt to fix critical issues in production during the cutover window. After the cutover, monitor the system closely for the first 48 hours. Watch for any errors in the logs and any user complaints about report accuracy. Have a dedicated support team on standby to address any issues that arise.

Post-Migration Stabilization and Monitoring

The migration is not complete until the system has stabilized. In the weeks following the go-live, continue to monitor the reports for any anomalies. Set up automated alerts for any report generation failures. Collect feedback from users and address any usability issues. If you find any data discrepancies, investigate the root cause and fix the code. Document all fixes and update your testing suite to include regression tests for these issues. This will help prevent the same problems from occurring in future upgrades. Additionally, review the performance of the reports. If any reports are slow, optimize the underlying queries or consider caching the results. Finally, update your documentation to reflect the new version's features and any changes to the reporting process. This will help new users understand how to use the reports and will reduce the burden on your support team. By following this structured approach, you can ensure a smooth migration of your custom Odoo reports and dashboards, maintaining data accuracy and operational continuity.

  • Audit all custom reports for deprecated API usage and model field changes.
  • Refactor Python and QWeb code in a staging environment that mirrors production.
  • Perform line-by-line data reconciliation between source and target systems.
  • Verify third-party add-on compatibility and update connection strings for BI tools.
  • Execute a full backup and restore test before the production cutover.
Written by
SysGenPro Editorial

SysGenPro Editorial

Platform & solutions team

Practical guidance on ERP, AI automation, cloud deployment and enterprise transformation from the SysGenPro team.

Share this article

Frequently asked questions

Common questions on this topic. Talk to our team for anything specific to your business.

01Can Odoo custom reports be migrated automatically?

No, custom reports cannot be migrated automatically. They require manual code refactoring because they often rely on specific APIs and templates that change between versions. Automated tools can handle standard modules, but custom code must be reviewed and updated by developers.

02What are the main risks of upgrading Odoo reports?

The main risks include data discrepancies, broken templates, and security misconfigurations. If field names change or APIs are deprecated, reports may display incorrect data or fail to render. Rigorous testing and reconciliation are essential to mitigate these risks.

03How do I test custom dashboards before going live?

Test custom dashboards in a staging environment with representative data. Compare the output with the source system to ensure accuracy. Test with different user roles to verify security rules. Perform performance testing to ensure that the dashboards load quickly.

04Do Odoo report templates change between versions?

Yes, Odoo report templates can change between versions. The base templates may be updated, and new features may be introduced. You must review your custom templates to ensure they are compatible with the new version's structure and styling.

05What is the best way to handle deprecated report APIs?

The best way to handle deprecated report APIs is to refactor the code to use the new, supported APIs. Identify all deprecated methods in your code and replace them with their modern equivalents. Test the refactored code thoroughly to ensure it works correctly.

06How long does it take to migrate custom Odoo reports?

The time required depends on the complexity and number of custom reports. A simple migration may take a few days, while a complex migration with many custom reports and third-party add-ons can take several weeks. Plan for a thorough testing phase to ensure accuracy.

Continue learning
View all articles
Explore the platform

Where to go next

Browse the knowledge hub

See how SysGenPro fits your business

Discuss your workflows, modules and deployment options with our team.

Back to resources