Skip to content
Odoo Migration

Odoo Migration: Handling Multi-Company Structures and Intercompany Transactions

A practical guide for CIOs and ERP consultants on migrating Odoo multi-company setups. Learn how to map company structures, handle intercompany transactions, and ensure data integrity during version upgrades or system replacements.

12 min readSysGenPro Editorial
Odoo Migration: Handling Multi-Company Structures and Intercompany Transactions

Direct Approach to Odoo Multi-Company Migration

Migrating Odoo multi-company structures requires a rigorous, phased approach that prioritizes data integrity and business continuity. The recommended strategy involves a complete audit of the source environment, precise mapping of company hierarchies, and detailed validation of intercompany transaction flows before any data transfer occurs. This is critical because multi-company setups in Odoo rely on complex relationships between partners, journals, and accounting entries that do not always translate automatically during version upgrades or system replacements. The primary risks to control include data loss in intercompany balances, broken customizations that depend on company-specific logic, and discrepancies in consolidated reporting. By establishing a clear mapping strategy and implementing robust testing protocols, organizations can mitigate these risks and ensure a smooth transition to the target environment.

Assessing Source and Target Environments

The first step in any Odoo migration is a comprehensive assessment of both the source and target versions. This involves documenting the exact Odoo version, the list of installed modules, and the specific configuration of the multi-company structure. For version upgrades, it is essential to verify compatibility with the vendor's official documentation, as changes in the database schema or API can significantly impact how company data is stored and processed. In a replacement scenario, the focus shifts to mapping the legacy system's company structure to Odoo's model. This includes identifying how companies are linked, whether they share a chart of accounts, and how intercompany transactions are currently recorded. A detailed inventory of custom modules is also necessary, as these often contain logic that handles company-specific rules, such as tax calculations or currency conversions. Without this assessment, the migration plan lacks the foundation needed to address potential conflicts or data inconsistencies.

Version-Specific Compatibility Checks

When upgrading Odoo versions, compatibility checks must be performed against the official release notes and technical documentation for the specific source and target versions. Changes in the ORM (Object-Relational Mapping) or the way company IDs are referenced can break existing custom code. For example, if a custom module relies on a deprecated field to determine the company context, it will fail in the new version. It is crucial to test these modules in a staging environment that mirrors the production data structure. This allows developers to identify and fix issues before the cutover. Additionally, third-party add-ons must be verified for compatibility with the target version, as some may not be supported or may require significant rework. This step is non-negotiable for ensuring that the multi-company functionality remains intact after the upgrade.

Mapping Company Structures and Hierarchy

Odoo's multi-company architecture is based on a parent-child relationship, where a parent company can have multiple subsidiaries. During migration, this hierarchy must be accurately replicated in the target system. This involves mapping each company's ID, name, and legal entity details. It is also important to define the relationships between companies, such as which companies are allowed to transact with each other. In Odoo, this is often controlled by the 'allowed company' field on the partner record. If this field is not correctly mapped, intercompany transactions may be blocked or recorded incorrectly. Furthermore, the chart of accounts must be aligned across companies if they are to be consolidated. If each company has a different chart of accounts, a mapping table must be created to translate account codes during the migration. This ensures that financial reports are consistent and comparable across the organization.

Handling Partner and Journal Records

Partner records in Odoo are central to multi-company operations. Each partner can be associated with multiple companies, and the 'company_id' field determines which company the partner belongs to. During migration, it is essential to deduplicate partner records and ensure that the company associations are correct. For example, if a supplier is used by multiple companies, the partner record should be shared, but the purchase orders and invoices should be linked to the specific company that made the transaction. Similarly, journal records must be mapped to the correct company. If a journal is shared across companies, it must be configured to allow entries from multiple companies. If not, separate journals should be created for each company. This level of detail is critical for maintaining the integrity of the accounting data and ensuring that intercompany transactions are recorded in the correct context.

Managing Intercompany Transactions

Intercompany transactions are one of the most complex aspects of Odoo migration. These transactions involve sales, purchases, or other financial events between two companies within the same organization. In Odoo, intercompany transactions are typically handled by creating a sale order in one company and a purchase order in the other, or by using the 'intercompany' module if available. During migration, it is essential to ensure that these transactions are correctly linked and that the corresponding journal entries are balanced. This involves mapping the sale order to the purchase order and verifying that the amounts, currencies, and tax rates are consistent. If the companies use different currencies, the exchange rate at the time of the transaction must be preserved. Any discrepancies in the intercompany balances can lead to errors in consolidated reporting, so a thorough reconciliation process is required. This includes comparing the total intercompany receivables and payables between the source and target systems to ensure that they match.

Currency Conversion and Tax Rules

Multi-company structures often involve different currencies and tax jurisdictions. During migration, it is crucial to map the currency conversion rules and tax rates for each company. If the source system uses a different method for calculating exchange rates, this must be replicated in the target system to ensure that the financial data is accurate. Similarly, tax rules must be mapped to the correct company and tax jurisdiction. If a company is subject to different tax rates in different countries, the tax configuration must be updated accordingly. This is particularly important for intercompany transactions, where the tax treatment may differ depending on the location of the buyer and seller. Failure to correctly map these rules can result in significant financial discrepancies and compliance issues. Therefore, a detailed review of the tax and currency configurations is essential before the migration is finalized.

Data Profiling and Cleansing

Before migrating any data, it is essential to perform data profiling and cleansing. This involves analyzing the source data to identify inconsistencies, duplicates, and missing values. For multi-company structures, this includes checking for duplicate partner records, incorrect company associations, and unbalanced intercompany transactions. Data cleansing involves correcting these issues before the data is transferred to the target system. This ensures that the target system receives clean, accurate data that can be trusted for reporting and decision-making. Data profiling also helps to identify potential risks and challenges that may arise during the migration. For example, if a large number of intercompany transactions are found to be unbalanced, this may indicate a systemic issue in the source system that needs to be addressed before the migration can proceed. By investing time in data profiling and cleansing, organizations can reduce the risk of data loss and ensure a smoother migration process.

Technical Execution and Database Migration

The technical execution of the migration involves transferring the data from the source system to the target system. This can be done using Odoo's built-in import/export tools, custom scripts, or third-party migration tools. The choice of tool depends on the complexity of the data and the specific requirements of the migration. For multi-company structures, it is often necessary to use custom scripts to handle the mapping of company IDs and intercompany transactions. These scripts must be thoroughly tested in a staging environment before they are used in production. The database migration also involves updating the schema to match the target version. This includes adding new tables, modifying existing tables, and updating indexes. It is essential to back up the source database before the migration and to test the restore process to ensure that the backup is valid. This provides a safety net in case the migration fails and the data needs to be restored.

Schema Compatibility and Extensions

Database schema compatibility is a critical factor in Odoo migration. Changes in the schema between versions can affect how data is stored and accessed. For example, if a field is renamed or removed in the target version, the data in that field may be lost or corrupted. It is essential to review the schema changes and update the migration scripts accordingly. Additionally, database extensions, such as those used for full-text search or geographic data, must be installed and configured in the target system. If these extensions are not compatible with the target version, they may need to be replaced or removed. This can have a significant impact on the functionality of the system, so it is important to plan for these changes in advance. By ensuring that the database schema is compatible with the target version, organizations can avoid data loss and ensure that the system performs as expected.

Validation and Testing

Validation and testing are essential steps in the Odoo migration process. This involves verifying that the data has been migrated correctly and that the system is functioning as expected. For multi-company structures, this includes testing the intercompany transactions, the consolidated reporting, and the company-specific configurations. Unit tests should be written for the custom modules to ensure that they work correctly in the new environment. Integration tests should be performed to verify that the data flows correctly between the different modules and companies. End-to-end business process tests should be conducted to simulate real-world scenarios, such as creating a sale order in one company and a purchase order in another. User acceptance testing (UAT) should be performed by key users to ensure that the system meets their needs and that they are comfortable using it. By performing thorough validation and testing, organizations can identify and fix issues before the system is put into production.

Reconciliation and Auditability

Reconciliation is a critical part of the validation process for multi-company migrations. This involves comparing the financial data in the source and target systems to ensure that they match. For intercompany transactions, this includes comparing the total receivables and payables between the companies. Any discrepancies must be investigated and resolved before the migration is finalized. Auditability is also important, as it ensures that the data can be traced back to its source. This involves maintaining a log of all the data transformations and mappings that were performed during the migration. This log can be used to audit the data and to identify any errors or inconsistencies. By ensuring that the data is reconciled and auditable, organizations can have confidence in the accuracy of their financial reporting and can meet their compliance requirements.

Cutover Planning and Deployment

Cutover planning is the final step before the migration is deployed to production. This involves defining the cutover window, the roles and responsibilities of the team, and the go/no-go criteria. The cutover window should be scheduled during a period of low business activity to minimize the impact on operations. The team should include representatives from IT, finance, and operations to ensure that all aspects of the migration are covered. The go/no-go criteria should be based on the results of the validation and testing. If any critical issues are identified, the cutover should be postponed until they are resolved. During the cutover, the data should be loaded into the target system, and the system should be tested to ensure that it is functioning correctly. Once the system is verified, it should be made available to the users. A rollback plan should be in place in case the migration fails. This plan should include the steps to restore the source system and to communicate the failure to the stakeholders.

Post-Migration Stabilization

Post-migration stabilization is the period after the cutover during which the system is monitored and supported. This involves monitoring the system for any errors or performance issues, providing support to the users, and making any necessary adjustments. It is also important to continue the reconciliation process to ensure that the data remains accurate. Any issues that are identified should be documented and resolved as quickly as possible. The stabilization period should last for at least one full business cycle to ensure that all aspects of the system are functioning correctly. By investing time in post-migration stabilization, organizations can ensure that the migration is successful and that the system provides the expected benefits.

PhaseKey ActivitiesResponsible RolesSuccess Criteria
AssessmentAudit source environment, map company structure, verify version compatibilityERP Consultant, IT DirectorComplete inventory of modules and data, compatibility report
MappingDefine company hierarchy, map partner and journal records, configure tax and currency rulesFinance Lead, ERP AdministratorApproved mapping document, test data validation
ExecutionCleanse data, migrate database, update schema, install extensionsDBA, DeveloperData loaded successfully, schema updated, backups verified
ValidationRun unit, integration, and UAT tests, reconcile intercompany balancesQA Team, Key UsersAll tests passed, reconciliation matches, no critical defects
CutoverExecute cutover plan, load final data, go-liveProject Manager, IT TeamSystem live, users trained, rollback plan ready
  • Verify all custom modules against the target Odoo version's official documentation.
  • Ensure intercompany transaction balances are reconciled between source and target systems.
  • Map currency conversion rules and tax jurisdictions for each company accurately.
  • Perform a full restore test of the database backup before the cutover.
  • Establish a clear go/no-go criteria based on validation and testing results.
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 do I map company structures during an Odoo upgrade?

Map the parent-child hierarchy of companies, ensuring that company IDs, names, and legal entity details are accurately replicated. Define the relationships between companies and configure the 'allowed company' field on partner records to control intercompany transactions.

02What are the common risks in intercompany transaction migration?

Common risks include unbalanced intercompany balances, incorrect currency conversion, and broken links between sale and purchase orders. These can lead to errors in consolidated reporting and compliance issues.

03Can Odoo automatically migrate multi-company data?

Odoo's built-in tools can migrate basic data, but multi-company structures often require custom scripts to handle complex mappings, such as company IDs and intercompany transactions. Automatic migration is not guaranteed for all configurations.

04How do I validate intercompany balances after migration?

Reconcile the total intercompany receivables and payables between the source and target systems. Compare the journal entries for each intercompany transaction to ensure that the amounts, currencies, and tax rates are consistent.

05What is the best approach for currency conversion in multi-company Odoo?

Preserve the exchange rate at the time of the transaction and map the currency conversion rules for each company. Ensure that the target system uses the same method for calculating exchange rates as the source system.

06How do custom modules affect multi-company migration?

Custom modules often contain logic that handles company-specific rules, such as tax calculations or currency conversions. These modules must be tested in a staging environment to ensure that they work correctly in the new version.

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