Skip to Content

Migrating from SAP Business One 9.3 to Odoo

A Complete Guide

Introduction

The migration from SAP Business One 9.3 to Odoo represents a significant strategic shift for companies looking to modernize their ERP infrastructure. This migration path offers organizations increased flexibility, an improved user experience, and a more cost-effective solution for managing their business operations. At Bemade, we have developed a robust methodology for this migration process, utilizing our custom module sap_b1_to_odoo and innovative data extraction techniques.

Our approach vs traditional methods

Unlike traditional migration approaches that place the heavy burden of manually extracting their data (often in CSV or XLSX format) on the client, our methodology significantly lightens this load. Most typical migration projects require the client to spend countless hours on data extraction, cleaning, and preparation, thereby diverting valuable resources from their core activities.

Our approach is fundamentally different:

  • Client resource release: We handle the entire technical process of data extraction and transformation
  • Focus on added value: The client can continue to focus on their daily operations and business strategy
  • Targeted participation: The client's involvement is primarily limited to validating the migrated data and conducting functional tests.
  • Effective feedback cycles: Stakeholders participate in testing the migrated databases, providing valuable feedback without getting bogged down in technical details.

This approach not only accelerates the migration process but also significantly improves the customer experience throughout the project.

The migration journey: Key phases

1. Needs analysis and planning

The foundation of any successful migration begins with a thorough analysis of the client's current implementation of SAP Business One:

  • Business Process Mapping: Documentation of existing workflows and identification of their translation into the Odoo architecture
  • Data Audit: Cataloging all data sources, identifying critical historical data, and determining retention requirements
  • Field mapping analysis: Creation of complete mappings between SAP B1 fields and their Odoo equivalents
  • Business Rules Documentation: Identification of the custom business logic that must be preserved in the new system
  • Integration Requirements: Assessment of third-party systems that need to connect to the new Odoo implementation

This phase typically involves several interviews with stakeholders and system analysis sessions to ensure that all requirements are accurately captured.

2. Data extraction and transformation

Our migration approach uses a two-step process for effective data management:

Step 1: Migration from MSSQL to PostgreSQL using Docker and pgloader

We use a containerized approach to extract data from the SAP MSSQL database:

  1. Docker environment configuration: We are creating a controlled environment using Docker containers:
    • MSSQL Server container to host the restored SAP database
    • PostgreSQL container as target database
    • Pgloader container to facilitate migration
  2. Database Restoration: The backup of the SAP Business One database (file .bak) is restored in the MSSQL Server container
  3. Data transfer with pgloader: Using a custom configuration, pgloader efficiently transfers the data:
    LOAD DATABASE
        FROM mssql://user:password@mssql-server:1433/SAPDatabase
        INTO postgresql://postgres:password@postgres:5432/target_db
    
     WITH include drop, create tables, create indexes, reset sequences,
          workers = 2, concurrency = 1, batch rows = 5000
    
     CAST type datetime to timestamptz
          drop default drop not null using zero-dates-to-null
    

This approach offers several advantages:

  • Isolation of the production systems migration process
  • Consistent environment regardless of where the migration is performed
  • Possibility of repeating the process multiple times during the testing phases

Step 2: Data Transformation and Loading into Odoo

Once the data is available in PostgreSQL, our custom module sap_b1_to_odoo takes over:

  1. Database connection: The module connects to the PostgreSQL database containing the SAP data
  2. Step-by-step import process: Data is imported in a specific sequence to maintain referential integrity:
    • Basic data (partners, products, etc.)
    • Configuration data (payment terms, price lists, etc.)
    • Transactional data (customer orders, purchase orders, invoices, etc.)
    • Attachments and additional data

3. Iterative Testing and Validation

The migration process follows an iterative approach:

  1. Initial test migration: A complete migration to identify major issues and gaps
  2. Gap Analysis: Documentation of Gaps and Missing Elements
  3. Module Improvement: Update of the migration module to address identified gaps
  4. Subsequent migrations: Repeating the process with increasingly shorter cycles
  5. Validation: Comparison of key metrics between systems (total orders, inventory values, etc.)

With each iteration, the migration becomes more complete and accurate, with cycle times generally decreasing from weeks to days, then to hours.

4. Preparation and execution of the production deployment

The final phase involves:

  1. User Training: Preparing users for the new interface and workflows of Odoo
  2. Final data migration: Executing the migration process with the current production data
  3. Transition Planning: Coordination of the transition from SAP to Odoo
  4. Production support: Provision of enhanced support during the initial days of operation

Technical innovation: Multiprocess architecture

One of the key innovations of our sap_b1_to_odoo module is its multiprocess implementation, which significantly speeds up the data migration process.

Overcoming Odoo's single-process limitation

The standard architecture of Odoo operates on a single-process worker model, which can become a bottleneck during large data imports. Our module implements a custom multiprocess approach that:

  1. Create child processes: Create multiple worker processes to handle data import in parallel
  2. Manages database connections: Establishes separate database connections for each worker
  3. Divide the data appropriately: Split large datasets into manageable chunks for parallel processing
  4. Coordinates the results: Aggregates the results of all work processes

Example of implementing our partner import process:

def import_partners_concurrent(self, cr):
    # Multiprocessing implementation
    spawn_method = multiprocessing.get_start_method()
    multiprocessing.set_start_method("fork", force=True)
    try:
        with ProcessPoolExecutor(max_workers=max_workers) as executor:
            futures = [
                executor.submit(
                    _create_partners_concurrent,
                    self.env.cr.dbname,
                    self.env.uid,
                    dict(self.env.context),
                    chunk,
                    vals_func.__name__,
                )
                for chunk in chunks
            ]

            for future in futures:
                partners += future.result()
        return partners
    finally:
        multiprocessing.set_start_method(spawn_method, force=True)

This approach has yielded impressive performance improvements:

  • Partner imports: 5 to 10 times faster
  • Product imports: 4 to 8 times faster
  • Customer order imports: 20 to 30 times faster

By using multiple CPU cores, we can process large datasets much more efficiently than Odoo's standard single-process workers.

Benefits of migration

Organizations migrating from SAP Business One to Odoo generally experience:

  1. Total Cost of Ownership Reduction: Lower licensing, maintenance, and upgrade costs
  2. Enhanced user experience: More intuitive interface and workflow
  3. Increased flexibility: Easier customization and extension capabilities
  4. Best integration options: Broader ecosystem of pre-built integrations
  5. Mobile Accessibility: Superior Mobile Experience for On-the-Go Access

Conclusion

The migration from SAP Business One to Odoo represents a strategic opportunity for businesses to modernize their ERP infrastructure while reducing costs. With our specialized migration methodology and customized tools, Bemade can facilitate this transition with minimal disruption and maximum data fidelity.

For organizations considering this migration path, we recommend starting with a thorough assessment of current business processes and data requirements before embarking on the technical migration journey.

Module Availability

Our module sap_b1_to_odoo is distributed under the LGPL-3 license (GNU Lesser General Public License, version 3) and is available upon request, with no specific qualifications required. However, it is important to note that:

  • Technical complexity: Using the module requires in-depth technical knowledge of Odoo, SAP's data structure and database management.
  • Customization required: The module generally needs to be tailored to meet the specific needs of each client and their SAP configuration.
  • Technical support: Although the code is freely available, our team provides valuable expertise for the implementation and adaptation of the module.

Do you want to know more?

Contact our team to obtain the module or to discuss how we can support you in your SAP to Odoo migration project.​


OnlyOffice for Odoo
a revolution in document management