Skip to content
Odoo Migration

Odoo Migration: Handling Custom Reports and Dashboards After Upgrade

A practical guide for CIOs and ERP consultants on migrating custom Odoo reports and dashboards. Covers dependency analysis, QWeb template changes, data model shifts, testing strategies, and cutover planning to ensure reporting integrity during version upgrades.

10 min readSysGenPro Editorial
Odoo Migration: Handling Custom Reports and Dashboards After Upgrade

Direct Answer: How to Handle Custom Reports and Dashboards in Odoo Migration

Handling custom reports and dashboards during an Odoo migration requires a proactive audit of code dependencies, data model changes, and rendering engine updates before the upgrade begins. The recommended approach involves isolating custom reporting modules in a staging environment, performing a full dependency analysis to identify deprecated APIs or changed ORM fields, and executing rigorous regression testing to validate data accuracy. This process is critical because reporting modules are often the most fragile components of an ERP system, relying heavily on specific database structures and view definitions that frequently change between major versions. The primary risks to control include silent data discrepancies, broken XML view inheritance, and performance degradation in complex dashboard queries. By treating reporting migration as a distinct workstream with its own validation criteria, organizations can prevent post-upgrade operational disruptions and ensure that financial and operational insights remain reliable.

Preparation: Dependency Analysis and Code Audit

The preparation phase is the most critical determinant of migration success. Before touching the production database, the technical team must conduct a comprehensive audit of all custom reporting modules. This involves mapping every custom report to its underlying data models, fields, and security rules. In Odoo, reports are often defined using QWeb templates and Python controllers. Between major versions, Odoo may deprecate specific Python methods, change the structure of the ORM (Object-Relational Mapping), or alter how XML views are inherited. For example, a report that relies on a specific field in the 'account.move' model may break if that field is renamed or its data type changes in the target version.

Identifying Deprecated APIs and Changed Models

Consult the official Odoo migration documentation for the specific source and target versions to identify known breaking changes. Look for changes in the 'ir.ui.view' records, which define the layout of reports and dashboards. If a custom module inherits from a standard Odoo view, verify that the parent view still exists and has the same structure. Additionally, check for changes in the reporting engine itself. Odoo has evolved its reporting mechanisms over time, moving from PDF generation libraries to more modern web-based rendering. If the target version uses a different rendering engine, custom CSS and JavaScript within the report templates may need to be rewritten to ensure visual consistency and printability.

Assessing Third-Party Add-Ons

Many organizations rely on third-party add-ons for advanced reporting and dashboarding capabilities. These modules must be verified for compatibility with the target Odoo version. Contact the module vendors to confirm that updated versions are available and supported. If a vendor has not released a compatible version, the organization must decide whether to wait for an update, seek an alternative module, or rewrite the custom code in-house. This decision should be made early in the project timeline to avoid bottlenecks during the technical execution phase.

Technical Execution: Staging Environment and Code Migration

Once the audit is complete, the technical execution begins in a representative staging environment. This environment should mirror the production database in terms of data volume and complexity, as performance issues in reporting often only manifest with large datasets. The first step is to upgrade the core Odoo instance to the target version. After the core upgrade, custom modules should be installed or updated one by one. This incremental approach allows the team to isolate errors and debug specific modules without the complexity of a full system failure.

Migrating QWeb Templates and XML Views

QWeb templates are the backbone of Odoo's reporting system. During migration, these templates must be reviewed for compatibility with the new version's rendering engine. Common issues include changes in how variables are passed to the template, updates to CSS classes, and modifications to the base layout. The team should use version control systems to track changes to these files, ensuring that every modification is documented and reversible. If the target version introduces new features for dashboarding, such as improved chart libraries or real-time data updates, the team should evaluate whether to adopt these new features to enhance the user experience.

Updating Python Controllers and ORM Calls

Python controllers that generate report data must be updated to reflect any changes in the ORM. This includes adjusting field names, modifying query logic, and ensuring that security rules are correctly applied. For example, if a report previously accessed a field directly, but the new version requires a computed field or a related field, the Python code must be updated accordingly. The team should also review any custom SQL queries used in the reports, as database schema changes may require updates to these queries to maintain data integrity.

Validation: Testing Strategies for Reporting Integrity

Validation is the phase where the migrated reports are tested for accuracy, performance, and usability. This phase is critical because reporting errors can lead to incorrect business decisions. The testing strategy should include unit tests for individual report components, integration tests for the interaction between reports and other modules, and end-to-end business process tests that simulate real-world usage. The goal is to ensure that the data presented in the reports matches the data in the database and that the reports are generated within acceptable time limits.

Data Reconciliation and Accuracy Checks

Data reconciliation involves comparing the output of the migrated reports with the expected values derived from the source data. This can be done by generating reports for a specific period in both the old and new versions and comparing the totals, subtotals, and line items. Any discrepancies must be investigated and resolved before the migration can proceed. The team should also test edge cases, such as empty datasets, large datasets, and datasets with special characters, to ensure that the reports handle all scenarios correctly.

Performance Benchmarking

Performance benchmarking is essential for ensuring that the migrated reports do not degrade the overall system performance. The team should measure the time taken to generate each report and compare it with the baseline performance from the old version. If the new version is slower, the team should investigate the cause, which may include inefficient queries, missing database indexes, or changes in the rendering engine. Optimizations may be required, such as adding indexes to frequently queried fields or caching report data to reduce database load.

Deployment: Cutover Planning and Rollback Strategy

The deployment phase involves moving the upgraded system from the staging environment to production. This is a high-risk activity that requires careful planning and coordination. The cutover plan should include a detailed timeline, clear ownership of tasks, and defined go/no-go criteria. The team should also prepare a rollback strategy in case the migration fails or critical issues are discovered after the cutover. The rollback strategy should include a verified backup of the production database and a documented procedure for restoring the system to its pre-upgrade state.

Cutover Runbook and Freeze Windows

The cutover runbook should outline every step required to complete the migration, including database backups, code deployment, data migration, and system validation. The team should define a freeze window during which no changes are made to the production system, ensuring that the migration is performed in a controlled environment. The go/no-go criteria should be based on the results of the validation phase, including data reconciliation, performance benchmarking, and user acceptance testing. If any critical issues are identified, the migration should be paused, and the issues should be resolved before proceeding.

Rollback Triggers and Recovery Plan

Rollback triggers are specific conditions that indicate the migration has failed and the system should be restored to its pre-upgrade state. These triggers may include critical data loss, system downtime exceeding a defined threshold, or the inability to generate key reports. The recovery plan should include a step-by-step procedure for restoring the database from backup, redeploying the old version of the code, and validating the system's functionality. The team should test the rollback procedure in the staging environment to ensure that it works as expected.

Stabilization: Post-Upgrade Monitoring and Support

After the migration is complete, the system enters the stabilization phase. This phase involves monitoring the system for any issues that may not have been detected during testing. The team should closely monitor system logs, performance metrics, and user feedback to identify and resolve any problems. The team should also provide additional support to users during this period, helping them adapt to any changes in the reporting interface or functionality. The stabilization phase should continue until the system is stable and all critical issues have been resolved.

Monitoring Reporting Performance and Accuracy

During the stabilization phase, the team should continue to monitor the performance and accuracy of the migrated reports. This includes tracking the time taken to generate reports, the frequency of errors, and the number of user complaints. The team should also perform periodic data reconciliation to ensure that the reports remain accurate over time. If any issues are identified, the team should investigate the cause and implement fixes as needed.

User Adoption and Training

User adoption is a critical factor in the success of the migration. The team should provide training to users on any changes to the reporting interface or functionality. This may include new features, updated layouts, or changed workflows. The team should also provide documentation and support resources to help users resolve any issues they encounter. By ensuring that users are comfortable with the new system, the organization can maximize the value of the migration and minimize the risk of user resistance.

Risk Management: Common Pitfalls and Mitigation

Despite careful planning, ERP migrations are inherently risky. Common pitfalls in handling custom reports and dashboards include ignoring dependency analysis, underestimating the complexity of code changes, and insufficient testing. To mitigate these risks, the team should adopt a risk-based approach to the migration, identifying potential risks early and developing mitigation strategies. This includes maintaining a detailed risk register, assigning ownership of risks, and regularly reviewing the risk status throughout the project.

  • Data Loss: Ensure verified backups and restore tests are performed before cutover.
  • Broken Customizations: Conduct thorough dependency analysis and code audits.
  • Reporting Discrepancies: Perform rigorous data reconciliation and accuracy checks.
  • Performance Regressions: Benchmark performance and optimize queries as needed.
  • User Adoption: Provide comprehensive training and support during stabilization.

Decision Framework: Rebuild vs. Migrate

In some cases, it may be more cost-effective to rebuild custom reports and dashboards from scratch rather than migrating the existing code. This decision should be based on a cost-benefit analysis that considers the complexity of the existing code, the availability of compatible modules, and the long-term maintainability of the solution. Rebuilding may be preferable if the existing code is heavily customized, relies on deprecated APIs, or is difficult to maintain. However, rebuilding also carries risks, including the potential for new bugs and the need for extensive testing. The team should carefully evaluate the options and make an informed decision based on the specific circumstances of the project.

FactorMigrate Existing CodeRebuild from Scratch
CostLower initial cost, higher maintenance costHigher initial cost, lower maintenance cost
TimeFaster if code is compatibleSlower due to development and testing
RiskRisk of hidden bugs and compatibility issuesRisk of new bugs and scope creep
MaintainabilityDepends on code qualityHigher if built with modern best practices

Conclusion: Ensuring Long-Term Reporting Success

Handling custom reports and dashboards during an Odoo migration is a complex but manageable process. By following a structured approach that includes dependency analysis, technical execution, rigorous validation, careful deployment, and post-upgrade stabilization, organizations can ensure that their reporting capabilities remain intact and reliable. The key to success is to treat reporting migration as a distinct workstream with its own validation criteria and risk mitigation strategies. By doing so, organizations can minimize the risk of reporting failures, maintain operational continuity, and maximize the value of their ERP investment. As Odoo continues to evolve, organizations must stay informed about version-specific changes and adapt their migration strategies accordingly to ensure long-term success.

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.

01Do custom Odoo reports break automatically after an upgrade?

Custom reports do not break automatically, but they are highly susceptible to breaking due to changes in data models, APIs, and rendering engines. A thorough audit and testing process is required to identify and fix any issues.

02How do I test custom reports in a staging environment?

Test custom reports in a staging environment by comparing the output with the expected values from the production system. Perform data reconciliation, performance benchmarking, and user acceptance testing to ensure accuracy and usability.

03What is the best way to handle deprecated report APIs in Odoo?

The best way to handle deprecated report APIs is to identify them during the dependency analysis phase and rewrite the code to use the new APIs. Consult the official Odoo documentation for guidance on the new APIs and best practices.

04Can I migrate dashboards without rewriting the code?

In some cases, dashboards can be migrated without rewriting the code if the underlying data models and APIs remain compatible. However, if there are significant changes, code rewriting may be necessary to ensure compatibility and performance.

05How long does it take to validate custom reports after an upgrade?

The time required to validate custom reports depends on the complexity of the reports and the number of modules involved. It can range from a few days to several weeks. A thorough validation process is essential to ensure data accuracy and system stability.

06What are the common causes of reporting discrepancies in Odoo upgrades?

Common causes of reporting discrepancies include changes in data models, incorrect field mappings, deprecated APIs, and performance issues. Rigorous data reconciliation and testing are required to identify and resolve these issues.

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