Skip to content
Odoo Migration

Odoo Migration: Handling Currency and Multi-Company Data Structures

A technical guide for CIOs and ERP consultants on migrating Odoo databases with complex multi-company and multi-currency setups. Learn how to map data structures, handle exchange rates, and prevent financial data corruption during version upgrades.

10 min readSysGenPro Editorial
Odoo Migration: Handling Currency and Multi-Company Data Structures

Direct Answer: Safeguarding Financial Integrity in Odoo Multi-Company Migrations

Migrating an Odoo instance with complex multi-company and multi-currency structures requires a rigorous approach to data mapping, exchange rate validation, and schema compatibility. The primary risk is financial data corruption, where currency conversions or company-specific field mappings fail during the version upgrade, leading to inaccurate reporting and audit failures. To mitigate this, organizations must perform a detailed data profiling of the source database, verify compatibility between the source and target Odoo versions using official vendor documentation, and execute multiple trial migrations in a representative staging environment. The process involves validating that all `res_company` and `res_currency` records are correctly mapped, ensuring that historical exchange rates are preserved, and confirming that custom modules do not introduce logic errors in financial calculations. Success depends on strict reconciliation of financial totals before and after the migration, ensuring that the target system maintains the same operational continuity and data integrity as the legacy system.

Assessing Source and Target Version Compatibility

The first step in any Odoo migration is a thorough assessment of the source and target versions. Odoo evolves rapidly, and significant changes to the data model, particularly in the `account` and `base` modules, can occur between major releases. For multi-company and multi-currency setups, it is critical to understand how the target version handles the `res_currency` model and the `company_id` field in financial records. You must verify whether the target version supports the specific currency conversion methods used in your source system. For example, if your source system uses a specific exchange rate provider or a custom rounding method, you must confirm that the target version supports these features natively or via compatible add-ons. Do not assume that all custom modules or third-party add-ons will migrate automatically. Each module must be reviewed for compatibility with the target version, and any deprecated APIs or changed models must be identified. This assessment should be documented in a compatibility matrix that lists each module, its version, and its status in the target environment. This matrix serves as the foundation for the migration plan and helps identify potential blockers early in the project.

Data Profiling and Mapping for Multi-Company Structures

Data profiling is essential to understand the complexity of your multi-company data structures. In Odoo, companies are defined in the `res_company` table, and each company has its own chart of accounts, fiscal positions, and currency settings. You must profile the number of companies, the currencies used by each company, and the volume of financial transactions associated with each company. This profiling helps identify potential issues, such as companies with multiple currencies or complex inter-company transactions. Data mapping involves defining how each field in the source database will be mapped to the target database. For multi-company structures, this includes mapping the `company_id` field in all relevant tables, such as `account_move`, `account_move_line`, and `res_partner`. You must also map the currency fields, such as `currency_id` and `amount_currency`, to ensure that the correct currency is applied to each transaction. Special attention must be paid to fields that are company-specific, such as the company logo, address, and tax configuration. These fields must be correctly mapped to ensure that each company's data is isolated and accurate in the target system. The mapping document should be reviewed by both technical and business stakeholders to ensure that it aligns with business requirements.

Data ElementSource TableTarget TableMapping Consideration
Company IDres_companyres_companyEnsure unique IDs are preserved or remapped consistently
Currency IDres_currencyres_currencyVerify currency codes and symbols match target version
Account Moveaccount_moveaccount_moveCheck company_id and currency_id fields for consistency
Exchange Rateres_currency_rateres_currency_rateValidate historical rates and conversion logic

Handling Currency Conversion and Exchange Rates

Currency conversion is one of the most complex aspects of Odoo migration. Odoo uses the `res_currency_rate` table to store exchange rates, and these rates are used to convert amounts between currencies. During migration, you must ensure that all historical exchange rates are correctly transferred to the target database. This includes rates for all currencies used in the system, for all dates in the transaction history. If any rates are missing or incorrect, financial reports will be inaccurate. You must also verify that the conversion logic in the target version matches the source version. For example, if the source version uses a specific rounding method for currency conversion, the target version must use the same method to ensure consistency. Custom modules that modify currency conversion logic must be carefully reviewed and tested. Any changes to the conversion logic can lead to discrepancies in financial reports, which can have serious consequences for audit and compliance. To mitigate this risk, you should perform a detailed reconciliation of financial totals before and after the migration, comparing the converted amounts in the source and target systems.

Custom Module and Add-On Compatibility

Custom modules and third-party add-ons are a significant risk factor in Odoo migration. These modules may rely on specific data structures, APIs, or business logic that have changed in the target version. For multi-company and multi-currency setups, custom modules that extend the `account` or `base` modules are particularly risky. You must analyze each custom module to identify any dependencies on specific fields, models, or APIs. If a module uses a field that has been renamed or removed in the target version, it will fail to load or produce incorrect results. You must also check for any changes in security rules or access rights that could affect the module's functionality. For example, if a custom module grants access to financial data for specific companies, you must ensure that the security rules are correctly configured in the target version. Modules that are not compatible with the target version must be updated or replaced. This process can be time-consuming and requires close collaboration with the module developers. It is recommended to test each module in a staging environment before the final migration to identify and resolve any compatibility issues.

Staging Environment and Trial Migrations

A representative staging environment is essential for testing the migration process. The staging environment should mirror the production environment in terms of hardware, software, and data volume. This ensures that the migration process is tested under realistic conditions. You should perform multiple trial migrations in the staging environment, each time refining the migration scripts and mapping documents. The first trial migration should focus on data integrity, ensuring that all records are correctly transferred. The second trial migration should focus on functionality, ensuring that all business processes work correctly in the target system. The third trial migration should focus on performance, ensuring that the target system can handle the expected load. Each trial migration should be followed by a detailed review of the results, identifying any issues and implementing fixes. This iterative process helps reduce the risk of failure during the final migration. It is also recommended to involve key business users in the trial migrations to ensure that the target system meets their needs.

Validation and Reconciliation of Financial Data

Validation and reconciliation are critical steps in ensuring the accuracy of the migrated data. You must compare the financial totals in the source and target systems, including total assets, liabilities, equity, revenue, and expenses. Any discrepancies must be investigated and resolved before the final migration. You should also validate the currency conversions, ensuring that the converted amounts in the target system match the source system. This can be done by comparing the `amount` and `amount_currency` fields in the `account_move_line` table. You must also validate the exchange rates, ensuring that the rates in the target system match the source system. This can be done by comparing the `rate` field in the `res_currency_rate` table. The validation process should be documented, with a clear record of any discrepancies and their resolution. This documentation is essential for audit and compliance purposes. It is recommended to use automated tools for validation, as manual checks are prone to error and can be time-consuming.

Validation CheckMethodResponsible RoleSuccess Criteria
Financial TotalsAutomated Script ComparisonFinance LeadZero discrepancy in total assets, liabilities, equity
Currency ConversionSample Transaction AuditERP ConsultantConverted amounts match source system within tolerance
Exchange RatesRate History ComparisonData AnalystAll historical rates present and accurate
Company IsolationAccess Control TestIT SecurityNo cross-company data leakage

Cutover Planning and Rollback Strategy

Cutover planning is essential to ensure a smooth transition from the source to the target system. The cutover plan should include a detailed timeline, with clear milestones and responsibilities. It should also include a rollback strategy, in case the migration fails. The rollback strategy should involve restoring the source database from a verified backup and reverting any changes made to the target system. You must ensure that the backup is complete and can be restored quickly. It is recommended to test the backup and restore process in the staging environment before the final migration. The cutover plan should also include a communication plan, informing all stakeholders of the migration schedule and any potential downtime. You should also define go/no-go criteria, based on the results of the trial migrations and validation checks. If any of the criteria are not met, the migration should be postponed. This approach helps reduce the risk of failure and ensures that the migration is only executed when it is ready.

Post-Migration Stabilization and Monitoring

Post-migration stabilization is crucial to ensure that the target system operates smoothly. You should monitor the system closely for any issues, such as performance degradation, data inconsistencies, or user errors. You should also provide support to users, helping them adapt to the new system. This can include training sessions, documentation, and a help desk. You should also monitor the financial reports, ensuring that they are accurate and consistent. Any issues identified during the stabilization phase should be documented and resolved promptly. This phase can last from a few days to a few weeks, depending on the complexity of the migration. It is recommended to have a dedicated team responsible for post-migration support, with clear roles and responsibilities. This team should be available to address any issues that arise and to provide guidance to users. The stabilization phase is an opportunity to refine the system and ensure that it meets the needs of the business.

Risk Management and Business Continuity

Risk management is an ongoing process throughout the migration project. You must identify and assess all potential risks, including data loss, downtime, broken customizations, and integration failures. For each risk, you must define a mitigation strategy and a contingency plan. For example, if there is a risk of data loss, you must ensure that backups are taken regularly and tested. If there is a risk of downtime, you must plan for a minimal downtime window and communicate it to all stakeholders. You must also consider the impact of the migration on business continuity. For example, if the migration involves a change in the chart of accounts, you must ensure that all financial reports are updated accordingly. You should also consider the impact on user adoption, ensuring that users are trained and supported. By managing risks proactively, you can reduce the likelihood of failure and ensure a successful migration.

Conclusion: Ensuring Long-Term ERP Maintainability

Migrating an Odoo instance with multi-company and multi-currency structures is a complex but manageable process. By following a structured approach, including version assessment, data profiling, trial migrations, and rigorous validation, you can ensure the integrity of your financial data and the continuity of your business operations. The key to success is attention to detail, thorough testing, and close collaboration between technical and business stakeholders. By managing risks proactively and maintaining a focus on data accuracy, you can achieve a successful migration that lays the foundation for long-term ERP maintainability. Remember to always verify compatibility and support against the vendor's official documentation for the exact source and target versions, as specific technical details can vary significantly between releases. This disciplined approach not only protects your business data but also enhances the overall value of your ERP investment.

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.

01How does Odoo handle currency conversion during a version upgrade?

Odoo uses the res_currency_rate table to store exchange rates. During an upgrade, these rates must be preserved and validated to ensure that historical transactions are converted correctly. The conversion logic must also be verified to match the source version's behavior.

02What are the risks of migrating a multi-company Odoo database?

Key risks include data corruption in company-specific fields, incorrect currency conversions, broken custom modules, and loss of inter-company transaction integrity. These risks can lead to inaccurate financial reporting and audit failures.

03Do I need to reconfigure exchange rates after an Odoo upgrade?

Yes, you must verify that all historical exchange rates are correctly transferred to the target database. You should also check if the target version uses the same exchange rate provider or conversion logic as the source version.

04How do I validate financial data integrity after Odoo migration?

You should perform a detailed reconciliation of financial totals, comparing assets, liabilities, equity, revenue, and expenses between the source and target systems. You should also validate currency conversions and exchange rates.

05Can custom modules break multi-company data structures in Odoo?

Yes, custom modules that extend the account or base modules can break multi-company data structures if they rely on deprecated APIs or changed fields. Each module must be tested in a staging environment to ensure compatibility.

06What is the recommended backup strategy for Odoo database migration?

You should take a full backup of the source database before the migration and test the restore process in a staging environment. You should also take incremental backups during the migration process to allow for quick rollback if needed.

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