Skip to content
James Ross
articlePublished Updated 8 min read

Leaving Salesforce for Odoo 19: the migration nobody budgets for

By James Ross

A Salesforce to Odoo 19 migration succeeds or fails on the data model, not on the export. Salesforce stores accounts, contacts and opportunities as separate objects with separate IDs. Odoo stores companies and people as partners and runs sales through its own CRM and sales models. The work is mapping, de-duplicating and validating records before they land, then repairing the rows the first pass got wrong.

Linked data blocks carried across a bridge and reassembled into a new structure, depicting a Salesforce to Odoo migration.

That same connector-and-control-plane thinking runs through Designing a multi-brand commerce control plane, where every external system gets an explicit contract rather than an implicit assumption.

Why a Salesforce to Odoo migration is a data-model translation

The two systems disagree about what a customer is, and that disagreement is the migration.

In Salesforce, an Account is the company, a Contact is a person attached to it, and an Opportunity is a revenue event attached to both. Each has its own 15- or 18-character ID, its own owner, its own sharing rules and its own history. The same real-world company can exist once as an Account and several times as Contacts, and a Contact can be reparented to a different Account without touching the Opportunity.

Odoo starts from a different centre. res.partner represents both companies and individuals; a company partner can have child contacts, and the same partner record is reused by sales, purchasing, accounting and projects. Odoo’s CRM then layers leads and opportunities (crm.lead) on top, and confirmed business becomes a sales order (sale.order). The Odoo model relations are documented in the server framework relations tutorial.

Salesforce Odoo 19 The trap
Account res.partner (company) One account may already exist as a partner from an email or invoice
Contact res.partner (individual, child of company) A contact with no account has nowhere obvious to attach
Opportunity crm.lead with type opportunity, then sale.order Stage names, probabilities and lost reasons do not map one-to-one
Lead crm.lead with type lead Converted leads and unconverted leads need different handling
Opportunity Contact Role Many2many relation Roles have no default Odoo equivalent
Owner (User) res.users Salesforce users who left the company still own records
Record type Selection field or separate model Record types usually become custom fields or dedicated models

A plan that says “Accounts → partners, Contacts → partners” is already wrong: both land in the same table and can collide.

What the Salesforce port actually breaks

A port breaks in predictable places, and each one produces bad rows rather than an error.

Identity collisions. Two Salesforce records that were distinct can normalise to the same Odoo partner. Odoo will happily accept both until someone tries to reconcile invoices, and then the duplicate is a finance problem, not a CRM problem.

Ownership gaps. Salesforce users are not Odoo users. A record with an owner who never got an Odoo login has to be reassigned, and the reassignment changes every report that grouped by owner.

Picklist drift. Salesforce picklist values are strings that sales operations edited for years. Odoo selection fields are validated, so an import either rejects the unknown value or silently writes an empty one, depending on the loader.

Address shape. Salesforce models billing and shipping addresses as structured fields on the Account; Odoo models an address as a partner, often a child contact. A company with three ships-from locations becomes three partners, not three fields.

The electrical-products rep firm in this project hit the identity and validation problems together: 184 CRM rows came out of the Salesforce port corrupted (from the project’s build records). Repairing them was a separate step after the port. A staging-to-production overhaul script was also part of the build.

How to sequence the migration

A migration in this order finds problems while they are still cheap.

  1. Freeze the source and record the cut line. Note the Salesforce export timestamp. Anything edited after it must be re-applied or accepted as lost.
  2. Extract with the legacy ID on every row. The Salesforce 18-character ID is the only reliable join key you will have for the next year.
  3. Map objects to Odoo models explicitly. Write the mapping down, including the fields that are deliberately dropped.
  4. De-duplicate before load, not after. Normalise company names, domains and phone numbers, and decide which record wins.
  5. Stage the load. Import into a copy of the Odoo database, never straight into production.
  6. Reconcile counts and sums. Row counts per object, open pipeline by stage, won revenue by period. A count that matches is weak evidence; a sum that matches is stronger.
  7. Cut over and keep the source read-only. Run both systems in parallel for one reporting cycle and compare the numbers a director actually reads.

Steps 6 and 7 are the ones that get skipped. They are also the only steps that catch a mapping error before the sales team does.

Large data needs its own import and export path

Odoo’s standard import screen is fine for a few thousand rows and a fixed set of columns. It is not a migration tool: it gives limited feedback per row, it is hard to make idempotent, and a partial failure leaves half a file loaded.

The project’s answer was a custom large-data export/import wizard inside Odoo 19 (from the project’s build records). The pattern is worth copying even if the implementation is not:

  • Key every row on a legacy ID. Store the Salesforce ID in a dedicated field with a unique constraint, so a re-run updates instead of duplicating.
  • Batch the writes. A few hundred records per transaction is enough to make progress visible and rollback cheap.
  • Report per row, not per file. “Most rows succeeded, seven failed, and here are the seven with reasons” is usable. “Import failed” is not.
  • Keep the raw extract. When a mapping decision is questioned three months later, the original file is the evidence.

A generic upsert pattern looks like this, and the principle applies whether the loader uses SQL, the Odoo ORM or the JSON-2 API:

-- one row per legacy Salesforce id: re-running updates, never duplicates
CREATE UNIQUE INDEX crm_lead_legacy_id_key ON crm_lead (x_salesforce_id);

INSERT INTO crm_lead (x_salesforce_id, name, type)
VALUES (:legacy_id, :name, 'opportunity')
ON CONFLICT (x_salesforce_id)
DO UPDATE SET name = EXCLUDED.name;
Load path Best for Weakness
Odoo import screen A few thousand clean rows, one-off Weak error reporting, hard to re-run safely
Custom in-app wizard Recurring loads by non-developers Must be built and tested
Script against the API/ORM One migration with developer supervision Needs a developer for every change
Connector running continuously Keeping two live systems in step Syncs drift; it is not a migration

Which should you choose? Use a script for the one-time migration, with a staging database and a reconciliation report. Build the wizard only if the business will keep loading files after cutover. Use a connector only for the overlap period, and give it an explicit direction of truth.

Why the dashboards were slow after the migration

The dashboards were slow because the queries changed shape, not because Odoo is slow.

Salesforce reports run on Salesforce’s reporting engine. After migration, the same questions arrive as SQL against PostgreSQL, often as a join across partners, sales orders and order lines with a date filter and a group-by. Without matching indexes, PostgreSQL scans and sorts far more rows than the report needs. The PostgreSQL index documentation is the reference for choosing the right type, and it is worth reading before adding a dozen indexes by instinct.

The work that mattered was unglamorous (from the project’s build records):

  • Measure first. Run EXPLAIN (ANALYZE, BUFFERS) on the most expensive dashboard query and read the plan, rather than guessing which column needs an index.
  • Index the filter and join columns. Customer, date and manufacturer are the usual suspects on a sales dashboard; a composite index in the order the query filters is usually better than three single-column indexes.
  • Pre-aggregate what does not need to be live. A monthly summary table refreshed on a schedule beats a six-way join on every page load.
  • Keep the ORM out of the hot path. Odoo’s ORM is convenient and correct; a dashboard that reads thousands of rows is often better served by a read-only SQL view.

The build included latency benchmarks against the dashboards, which is the only way to know whether an index helped or just made writes slower.

Keeping Salesforce and Odoo in step during the transition

Nobody cuts over in a day. During the overlap, one system has to be the source of truth per object, and the sync has to be idempotent.

The project used Salesforce-to-Odoo sync scripts alongside the staged import (from the project’s build records). The rules that make that safe are general:

  • Declare the owner per field. If Salesforce owns the opportunity stage and Odoo owns the invoice, write it down; a field owned by both will oscillate.
  • Sync on the legacy ID. Never on name or email.
  • Make every write an upsert. The sync will re-run after a failure, and the second run must be a no-op.
  • Log conflicts rather than resolving them silently. A changed value on both sides is a business decision, not a merge algorithm.
  • Stop the sync before the cutover script runs. A staging-to-production rebuild while a sync is writing is how environments get corrupted.

What broke and what we changed

184 corrupted CRM rows. The port left 184 CRM rows corrupted, and repairing them was its own step after the data landed (from the project’s build records). The safeguard is to validate staged data against Odoo’s constraints before promotion.

Dashboard latency. The dashboards were measured and indexed as part of the build (from the project’s build records). Treating the benchmark as part of the feature is what keeps a dashboard usable after the next data load.

Large imports. The export/import wizard exists because a failed import with no per-row report is indistinguishable from a successful one until someone checks the data.

The email logger stayed a proposal. An Outlook-to-Odoo email logger was scoped and proposed, not built (from the project’s build records). Saying so matters: a proposal is not a shipped feature, and a migration write-up that blurs the two is not useful to anyone planning their own.

Frequently asked questions

How long does a Salesforce to Odoo migration take?

It depends on how much history and how many custom objects you keep. The work in this project spanned March to November 2026, with the sales core live (from the project's build records). Plan the data mapping and the repair pass as separate phases, because the repair is where schedules slip.

Can Odoo import Salesforce CSV exports directly?

Not cleanly. A Salesforce export gives you one file per object with Salesforce IDs and picklist strings; Odoo expects partners, leads and orders in its own shape. You can load the CSVs through a staging schema, but the mapping, de-duplication and validation are still yours to write.

What happens to Salesforce opportunities?

They become Odoo leads with the opportunity type, then sales orders when they are won. Stages, probabilities and lost reasons need an explicit mapping table, because the two systems do not share a stage vocabulary. Keep the legacy ID on the lead so the original record can always be found.

Do we need to migrate tasks, notes and attachments?

Only if someone will use them. They are separate objects with their own relationships, and they are the most common silent omission. Decide per object, write the decision down, and tell the sales team what will and will not be there after cutover.

Why not just use a connector to move everything?

A connector is built to keep two live systems in step, not to land a clean first copy. It will happily reproduce duplicates and invalid picklist values. Use a connector for the overlap period, with one declared source of truth per field, and use a migration script for the initial load.

How do you verify a Salesforce to Odoo migration?

Compare counts per object, sums per period, and a sample of records opened side by side. Then compare the numbers a director reads: open pipeline by stage, won revenue by month, and the top twenty accounts. A migration that matches row counts but not the board report is not finished.

Is Odoo 19 a good fit for a sales-rep business?

It can be, because partners, leads, orders and manufacturers live in one model instead of four objects with their own sharing rules. The trade-off is that Odoo expects you to adopt its model; a business that wants Salesforce's exact record types and sharing model will spend the migration budget fighting it.