Part 6: Testing, Troubleshooting, and Maintaining a WooCommerce to Odoo Sync

Billable hours refers to the time spent on all activities on services for your client or employer that you’re getting payed for.

man wearing black crew-neck shirt

Yann Paul

HR Manager

Quick Start Guide

A calculator ontop a table

Part 5: Syncing WooCommerce Orders, Invoices, Taxes, and Payments to Odoo

Orders are where the WooCommerce to Odoo integration becomes operational.

Products define what is being sold.

Customers define who the sale belongs to.

Orders define the actual transaction.

When an order is placed in WooCommerce, that order needs to be correctly represented in Odoo so the business can manage sales, invoicing, payments, accounting, tax, fulfilment, reporting, and customer history.

If order syncing is not mapped correctly, the business may end up with missing invoices, duplicate sales orders, incorrect tax records, wrong payment statuses, or orders linked to the wrong customer or product.

The main goal is to answer one simple question:

When a WooCommerce order is placed, what should be created or updated in Odoo?

This article will cover how to sync WooCommerce orders, invoices, taxes, payments, refunds, coupons, shipping lines, and order statuses into Odoo.

Order Data in WooCommerce

In WooCommerce, an order is created when a customer completes checkout.

The order contains the key transaction data, including:

  • Customer details

  • Billing address

  • Shipping address

  • Product line items

  • Product quantities

  • Product prices

  • Shipping charges

  • Discounts

  • Coupons

  • Taxes

  • Payment method

  • Payment status

  • Order status

  • Refund details

  • Customer notes

  • Admin notes

WooCommerce orders are usually the starting point for the sync into Odoo.

This is because the WooCommerce order connects together the customer, product, payment, shipping, tax, and invoice requirements.

WooCommerce Order Data

WooCommerce order data may include:

Order Data

WooCommerce Source / Field

Order ID

wp_posts -> ID

Order Number

WC_Order -> get_order_number()

Order Status

wp_posts -> post_status / WC_Order -> get_status()

Customer User ID

wp_postmeta -> _customer_user

Billing Email

wp_postmeta -> _billing_email

Billing Phone

wp_postmeta -> _billing_phone

Billing Address

_billing_address_1, _billing_address_2, _billing_city, _billing_state, _billing_postcode, _billing_country

Shipping Address

_shipping_address_1, _shipping_address_2, _shipping_city, _shipping_state, _shipping_postcode, _shipping_country

Order Currency

wp_postmeta -> _order_currency

Order Total

wp_postmeta -> _order_total

Order Tax

wp_postmeta -> _order_tax

Cart Discount

wp_postmeta -> _cart_discount

Shipping Total

wp_postmeta -> _order_shipping

Shipping Tax

wp_postmeta -> _order_shipping_tax

Payment Method

wp_postmeta -> _payment_method

Payment Method Title

wp_postmeta -> _payment_method_title

Transaction ID

wp_postmeta -> _transaction_id

Date Paid

wp_postmeta -> _date_paid

Date Completed

wp_postmeta -> _date_completed

Customer Note

wp_posts -> post_excerpt

Order Line Items

woocommerce_order_items

Order Line Item Meta

woocommerce_order_itemmeta

For most WooCommerce to Odoo integrations, the most important order data is:

  • Order number

  • Order status

  • Customer

  • Product line items

  • Product SKUs

  • Quantity

  • Unit price

  • Discounts

  • Shipping

  • Tax

  • Payment method

  • Payment transaction ID

This data needs to be mapped into the correct Odoo sales and accounting records.

Order Data in Odoo

In Odoo, an order may be represented in a few different ways depending on the business workflow.

The main Odoo models involved are usually:

  1. sale.order

  2. sale.order.line

  3. account.move

  4. account.move.line

  5. account.payment

  6. stock.picking

  7. stock.move

A WooCommerce order may create a sales order in Odoo.

That sales order may then create an invoice.

The invoice may then be marked as paid when payment information is synced.

If inventory is enabled, the order may also create a delivery order and stock movements.

This means order sync is not just about copying order data.

It is about deciding which Odoo workflow should be triggered.

Odoo Order Data

Odoo order and invoice data may include:

Data

Odoo Model / Field

Sales Order

sale.order

Sales Order Name

sale.order -> name

Customer

sale.order -> partner_id

Invoice Address

sale.order -> partner_invoice_id

Delivery Address

sale.order -> partner_shipping_id

Order Date

sale.order -> date_order

Pricelist

sale.order -> pricelist_id

Payment Terms

sale.order -> payment_term_id

Salesperson

sale.order -> user_id

Sales Team

sale.order -> team_id

Order Lines

sale.order -> order_line

Product on Order Line

sale.order.line -> product_id

Quantity

sale.order.line -> product_uom_qty

Unit Price

sale.order.line -> price_unit

Discount

sale.order.line -> discount

Taxes

sale.order.line -> tax_id

Subtotal

sale.order.line -> price_subtotal

Invoice

account.move where move_type = 'out_invoice'

Invoice Customer

account.move -> partner_id

Invoice Date

account.move -> invoice_date

Invoice Lines

account.move -> invoice_line_ids

Payment

account.payment

Payment State

account.move -> payment_state

Delivery Order

stock.picking

Stock Moves

stock.move

The key decision is whether WooCommerce orders should create:

  1. Odoo sales orders only

  2. Odoo invoices only

  3. Both sales orders and invoices

  4. Sales orders, invoices, payments, and stock deliveries

For most businesses using Odoo as an ERP, the best structure is usually:

WooCommerce Order → Odoo Sales Order → Odoo Invoice → Odoo Payment → Odoo Delivery / Stock Movement

However, not every business needs the full workflow.

Some stores may only need invoices created in Odoo for accounting.

Others may need the full sales, inventory, and fulfilment process.

Mapping WooCommerce Orders to Odoo Sales Orders

A basic WooCommerce order to Odoo sales order mapping may look like this:

WooCommerce Data

WooCommerce Field

Odoo Data

Odoo Field

Order Number

WC_Order -> get_order_number()

Sales Order Reference

sale.order -> client_order_ref or sale.order -> name

Customer

_billing_email / customer mapping

Customer

sale.order -> partner_id

Billing Address

Billing fields

Invoice Address

sale.order -> partner_invoice_id

Shipping Address

Shipping fields

Delivery Address

sale.order -> partner_shipping_id

Order Date

post_date / order date

Order Date

sale.order -> date_order

Currency

_order_currency

Pricelist / Currency

sale.order -> pricelist_id

Product Line Item

woocommerce_order_items

Order Line

sale.order -> order_line

Product SKU

line item product SKU

Product

sale.order.line -> product_id

Quantity

line item quantity

Quantity

sale.order.line -> product_uom_qty

Unit Price

line item total / quantity

Unit Price

sale.order.line -> price_unit

Discount

coupon / line discount

Discount

sale.order.line -> discount

Tax

line tax

Taxes

sale.order.line -> tax_id

Shipping

shipping line

Delivery / Shipping Product

sale.order.line -> product_id

Customer Note

post_excerpt

Notes

sale.order -> note

The most important part of this mapping is the order line.

Each WooCommerce order line must connect to the correct Odoo product.

Usually, this is done by matching:

WooCommerce product SKU → Odoo product.product -> default_code

If the product cannot be found in Odoo, the order may fail to sync.

This is why product mapping should be completed before order syncing is enabled.

Mapping WooCommerce Order Line Items

WooCommerce order lines represent the actual products purchased.

Each order line may include:

  • Product ID

  • Variation ID

  • Product name

  • SKU

  • Quantity

  • Unit price

  • Subtotal

  • Tax

  • Total

  • Discount

  • Metadata

In Odoo, this usually maps to sale.order.line.

WooCommerce Line Item

Odoo Field

Product SKU

sale.order.line -> product_id matched by product.product -> default_code

Product Name

sale.order.line -> name

Quantity

sale.order.line -> product_uom_qty

Unit Price

sale.order.line -> price_unit

Discount

sale.order.line -> discount

Tax

sale.order.line -> tax_id

Line Subtotal

sale.order.line -> price_subtotal

For simple products, the mapping is usually straightforward.

For variable products, the WooCommerce variation SKU should be used.

This is important because the parent product is not always the actual item purchased.

For example:

WooCommerce Order Line

Correct Odoo Match

T-Shirt, Medium, Black

product.product -> default_code = TSHIRT-M-BLK

T-Shirt parent product

Not usually the correct purchasable variant

If the sync uses the parent product instead of the variation, Odoo may receive the wrong product.

This can cause incorrect stock, invoices, and reporting.

Mapping WooCommerce Orders to Odoo Invoices

The next decision is whether the WooCommerce order should create an Odoo invoice.

In Odoo, customer invoices are usually stored in:

account.move

With:

account.move -> move_type = 'out_invoice'

A basic invoice mapping may look like this:

WooCommerce Data

Odoo Invoice Data

WooCommerce Order Number

account.move -> invoice_origin

Customer

account.move -> partner_id

Invoice Date

account.move -> invoice_date

Product Lines

account.move -> invoice_line_ids

Product

account.move.line -> product_id

Quantity

account.move.line -> quantity

Unit Price

account.move.line -> price_unit

Tax

account.move.line -> tax_ids

Total

account.move -> amount_total

Payment Status

account.move -> payment_state

There are two common approaches.

Option 1: Create Sales Order First

The WooCommerce order creates an Odoo sales order.

Then the Odoo sales order creates the invoice.

This is usually cleaner because it follows the standard Odoo sales workflow.

Option 2: Create Invoice Directly

The WooCommerce order creates an Odoo invoice directly.

This can be useful for stores that only need accounting records and do not need Odoo sales order management.

The best option depends on how the business uses Odoo.

If the business uses Odoo for stock, sales orders, fulfilment, delivery orders, and reporting, it is usually better to create the sales order first.

If the business only uses Odoo Accounting, direct invoice creation may be enough.

Invoice Timing

Invoice timing is another important decision.

Should the invoice be created when:

  • The WooCommerce order is placed?

  • The WooCommerce order is paid?

  • The WooCommerce order is processing?

  • The WooCommerce order is completed?

  • The order is manually approved?

  • The order is shipped?

There is no single correct answer.

It depends on the business process.

For most paid online orders, a common setup is:

WooCommerce Status

Odoo Action

Pending Payment

Do not create invoice yet

Processing

Create sales order and invoice

Completed

Confirm delivery or mark complete

Cancelled

Cancel related Odoo order or invoice

Refunded

Create refund / credit note

Failed

Do not sync or mark as failed

A practical rule is:

Only create the Odoo invoice once the WooCommerce order has been paid or confirmed.

This prevents unpaid or failed orders from creating unnecessary accounting records in Odoo.

Mapping Taxes

Tax mapping needs to be handled carefully.

WooCommerce and Odoo may calculate tax differently.

WooCommerce tax is usually based on:

  • Store tax settings

  • Customer billing address

  • Customer shipping address

  • Product tax class

  • Shipping tax class

  • Tax-inclusive or tax-exclusive pricing

Odoo tax is usually based on:

  • Product tax settings

  • Fiscal position

  • Customer location

  • Company tax setup

  • Account mapping

  • Tax rules

A basic tax mapping may look like this:

WooCommerce Tax Data

Odoo Tax Data

WooCommerce Tax Rate

account.tax

Product Tax Class

Product tax mapping

Line Item Tax

sale.order.line -> tax_id

Shipping Tax

Shipping product tax

Tax Total

Invoice tax lines

Before syncing taxes, confirm:

  • Are WooCommerce prices tax-inclusive or tax-exclusive?

  • Are Odoo prices tax-inclusive or tax-exclusive?

  • Should WooCommerce or Odoo calculate tax?

  • Should the exact WooCommerce tax amount be passed to Odoo?

  • Should Odoo recalculate tax using its own tax rules?

  • Are product tax classes mapped?

  • Are shipping taxes mapped?

  • Are tax rates different by country, state, or region?

Tax syncing can become difficult if WooCommerce calculates one amount and Odoo recalculates a different amount.

For this reason, many integrations use one of two approaches.

Option 1: WooCommerce Calculates Tax

WooCommerce calculates the order tax, and Odoo receives the tax values.

This is useful when WooCommerce is the checkout system and the tax amount shown to the customer must match the invoice.

Option 2: Odoo Calculates Tax

WooCommerce sends the order lines, and Odoo applies its own tax rules.

This is useful when Odoo is the accounting source-of-truth.

The risk is that Odoo may calculate a slightly different total if tax settings are not aligned.

Before going live, test this carefully with different products, countries, tax classes, and shipping methods.

Mapping Payments

Payment syncing depends on how the business wants to manage payment records in Odoo.

WooCommerce payment data may include:

Payment Data

WooCommerce Field

Payment Method

_payment_method

Payment Method Title

_payment_method_title

Transaction ID

_transaction_id

Date Paid

_date_paid

Order Total

_order_total

Payment Status

WooCommerce order status

Odoo payment data may include:

Payment Data

Odoo Model / Field

Payment

account.payment

Payment Journal

account.payment -> journal_id

Payment Amount

account.payment -> amount

Payment Date

account.payment -> date

Payment Reference

account.payment -> ref

Payment State

account.move -> payment_state

The sync needs to decide whether WooCommerce payments should:

  1. Only mark the invoice as paid

  2. Create an Odoo payment record

  3. Create payment journal entries

  4. Leave payment reconciliation to the finance team

For simple setups, the sync may create the invoice and mark it as paid when WooCommerce confirms payment.

For accounting-focused setups, the payment should be created in the correct Odoo journal.

For example:

WooCommerce Payment Method

Odoo Journal

Stripe

Stripe Journal

PayPal

PayPal Journal

Bank Transfer

Bank Journal

Cash on Delivery

Manual Payment / Receivables

Credit Card

Payment Gateway Journal

This is important because the payment method affects reconciliation, bank matching, and accounting reports.

Mapping Shipping Lines

Shipping is usually represented as a separate line in WooCommerce.

In Odoo, shipping can be handled using a delivery product or delivery carrier.

A basic shipping mapping may look like this:

WooCommerce Shipping Data

Odoo Data

Shipping Method

Delivery Carrier or Shipping Product

Shipping Total

Sales Order Line

Shipping Tax

Shipping Tax

Shipping Address

Delivery Address

Tracking Details

Delivery Order / Custom Field

For simple setups, shipping can be created as an order line using a generic shipping product.

For example:

Shipping Fee → product.product -> default_code = SHIPPING

For more advanced setups, WooCommerce shipping methods may map to Odoo delivery carriers.

For example:

WooCommerce Shipping Method

Odoo Delivery Carrier

Flat Rate

Flat Rate Carrier

Free Shipping

Free Shipping Carrier

Local Pickup

Pickup

DHL

DHL Carrier

FedEx

FedEx Carrier

The main thing is to avoid losing shipping charges.

If shipping is not mapped correctly, the Odoo order total may not match the WooCommerce order total.

Mapping Coupons and Discounts

WooCommerce discounts may come from coupons, sale prices, manual discounts, or plugin-based promotions.

Discounts may be applied at:

  • Product line level

  • Cart level

  • Order level

  • Shipping level

Odoo can handle discounts through order line discounts or separate discount products, depending on configuration.

A basic mapping may look like this:

WooCommerce Discount

Odoo Mapping

Product line discount

sale.order.line -> discount

Coupon discount

Discount line or line-level discount

Cart discount

Separate discount product or distributed across lines

Free shipping coupon

Shipping line set to zero

The decision depends on how the business wants to report discounts in Odoo.

If discounts need to be visible by product, line-level discount mapping may be best.

If discounts only need to reduce the order total, a separate discount line may be enough.

The most important requirement is that the Odoo total matches the WooCommerce total.

Mapping Refunds and Credit Notes

Refunds need to be handled carefully because they affect accounting, reporting, payments, and stock.

WooCommerce refunds may include:

  • Full refunds

  • Partial refunds

  • Product refunds

  • Shipping refunds

  • Tax refunds

  • Manual refunds

  • Gateway refunds

In Odoo, refunds are usually represented as credit notes.

WooCommerce Refund

Odoo Refund

Refunded Order

Credit Note

Refunded Product Line

Credit Note Line

Refunded Tax

Tax Reversal

Refunded Payment

Payment Reversal / Reconciliation

Refunded Stock

Return / Stock Movement

The sync needs to decide:

  • Should WooCommerce refunds create Odoo credit notes?

  • Should partial refunds be supported?

  • Should refunded stock be returned to inventory?

  • Should refunded shipping be included?

  • Should refund reasons sync?

  • Should payment refunds sync to Odoo journals?

A simple refund sync may only create a credit note.

A more advanced refund sync may also process stock returns and payment reconciliation.

Refunds should always be tested before going live.

Order Status Mapping

WooCommerce and Odoo use different order workflows.

WooCommerce order statuses may include:

WooCommerce Status

Meaning

Pending Payment

Order created but not paid

Processing

Payment received, order being fulfilled

Completed

Order fulfilled

On Hold

Waiting for manual action

Cancelled

Order cancelled

Refunded

Order refunded

Failed

Payment failed

Odoo sales orders and invoices have their own states.

A basic mapping may look like this:

WooCommerce Status

Odoo Action

Pending Payment

Do not confirm order yet

Processing

Create/confirm sales order and invoice

Completed

Mark delivery as done if applicable

On Hold

Create draft order or hold sync

Cancelled

Cancel Odoo sales order if not invoiced

Refunded

Create credit note

Failed

Do not create order or mark sync failed

The important thing is to avoid creating final accounting records for orders that may never be paid.

This is why many integrations wait until the WooCommerce order reaches Processing or Completed before creating the final invoice in Odoo.

Recommended Order Sync Rules

A reliable WooCommerce to Odoo order sync should usually follow these rules:

  1. Products should be mapped before orders are synced.

  2. Customers should be matched or created before the order is created.

  3. WooCommerce order number should be stored in Odoo.

  4. WooCommerce order lines should match Odoo products by SKU.

  5. Variable product orders should use the variation SKU, not only the parent product.

  6. Shipping lines should be mapped to a shipping product or delivery carrier.

  7. Coupons and discounts should be mapped so totals remain accurate.

  8. Taxes should be tested carefully before going live.

  9. Invoices should only be created when the order is paid or confirmed.

  10. Payments should be mapped to the correct Odoo payment journal.

  11. Refunds should create credit notes where required.

  12. Failed or unpaid orders should not create final accounting records unless required.

Order Sync Checklist

Before syncing WooCommerce orders to Odoo, confirm the following:

  • Should WooCommerce create Odoo sales orders?

  • Should WooCommerce create Odoo invoices directly?

  • Should both sales orders and invoices be created?

  • At which WooCommerce status should the sync run?

  • Should unpaid orders sync?

  • Should failed orders sync?

  • Should cancelled orders cancel Odoo orders?

  • Should refunded orders create credit notes?

  • Should partial refunds be supported?

  • Should WooCommerce order numbers be stored in Odoo?

  • Should Odoo order numbers be returned to WooCommerce?

  • Should payments be synced?

  • Which Odoo journal should each payment method use?

  • Should tax be calculated by WooCommerce or Odoo?

  • Are tax-inclusive and tax-exclusive prices aligned?

  • Should coupons map as line discounts or separate discount lines?

  • Should shipping methods map to delivery carriers or shipping products?

  • Which Odoo warehouse should fulfil WooCommerce orders?

  • Should orders create delivery orders?

  • Should stock be reduced in Odoo?

  • Should customer notes sync?

  • Should admin notes sync?

  • Should order metadata from custom plugins sync?

These questions should be answered before order sync is turned on.

Common Order Sync Problems

Problem

Cause

Order fails to sync

Product or customer cannot be matched

Wrong product on order line

Parent product used instead of variation SKU

Odoo total does not match WooCommerce total

Tax, discount, or shipping mapping issue

Duplicate sales orders

Sync runs multiple times without checking existing order reference

Invoice created for unpaid order

Incorrect status mapping

Payment not marked as paid

Payment method not mapped to Odoo journal

Shipping missing from invoice

Shipping line not mapped

Coupon missing

Discount logic not configured

Refund not reflected in Odoo

Credit note sync not configured

Stock not updated

Warehouse or delivery workflow not configured

Most of these issues can be avoided through careful status mapping, SKU matching, tax testing, and payment configuration.

Final Thoughts

Order syncing is the bridge between WooCommerce and Odoo.

It connects products, customers, prices, taxes, payments, invoices, shipping, and stock into one transaction.

Because of this, it is one of the most important parts of the integration to plan properly.

For a simple store, the order sync may only need to create an invoice in Odoo once a WooCommerce order is paid.

For a more advanced business, the sync may need to create sales orders, invoices, payments, delivery orders, stock movements, refunds, and credit notes.

The key is to define the workflow before implementation.

Do not start with the technical sync.

Start with the business process.

Once the order flow is clear, the technical mapping becomes much easier to build, test, and maintain.

Part 6: Testing, Troubleshooting, and Maintaining a WooCommerce to Odoo Sync

A WooCommerce to Odoo integration should not be treated as a one-time setup.

It is an ongoing system connection between your e-commerce store and your ERP.

Once the sync is live, it becomes part of the business process. Orders, customers, products, invoices, payments, stock, refunds, and reporting may all depend on it working correctly.

For this reason, testing and maintenance are just as important as the original setup.

The main goal is to answer one simple question:

How do we know the WooCommerce to Odoo sync is working correctly, and what do we do when it fails?

This article will cover testing, staging environments, logs, failed syncs, duplicate records, API errors, retry logic, background processing, monitoring, and ongoing maintenance.

Why Testing Matters

A WooCommerce to Odoo sync touches important business data.

If it fails, the result may not be obvious immediately.

A customer may still place an order.

WooCommerce may still take payment.

The store may still show a successful checkout.

But behind the scenes, Odoo may not receive the order, invoice, customer, product, payment, or stock update.

That can create problems later.

For example:

  • Finance may not see the invoice.

  • Stock may not reduce correctly.

  • The fulfilment team may not see the delivery order.

  • The customer may not appear in Odoo.

  • Reporting may not match WooCommerce.

  • Refunds may not be reflected in accounting.

  • Duplicate customers or products may be created.

This is why testing should happen before the sync goes live.

Testing should also continue after the sync is live.

Use a Staging Environment First

Where possible, the integration should be tested in a staging environment before being connected to the live WooCommerce store and live Odoo database.

A good testing setup may include:

System

Testing Environment

WooCommerce

Staging WordPress site

Odoo

Odoo test database or staging database

Payment Gateway

Sandbox payment mode

Shipping

Test shipping methods

Email

Disabled or test-only email sending

Stock

Test products and test quantities

This allows the business to test the full workflow without affecting real customers, invoices, stock, or accounting records.

Avoid testing a new integration directly on live data unless there is no other option.

If live testing is required, use a small controlled test order and document exactly what is being tested.

Core Test Scenarios

The sync should be tested across the main business workflows.

At a minimum, test the following:

Product Tests

Test

Expected Result

Sync simple product

Product is created or matched correctly in Odoo

Sync variable product

Odoo product template and variants are created correctly

Product with missing SKU

Sync fails safely or flags the product

Product with duplicate SKU

Sync prevents incorrect mapping

Product price update

Correct system updates the correct price field

Product stock update

Correct stock quantity appears in WooCommerce and Odoo

Product image sync

Main and variant images sync if enabled

Customer Tests

Test

Expected Result

Registered customer order

Customer is matched or created in Odoo

Guest customer order

Guest billing details create or match an Odoo contact

Existing Odoo customer

Order links to existing res.partner

B2B company order

Company/contact structure is correct

Different billing and shipping address

Invoice and delivery addresses are handled correctly

Updated customer details

Only approved fields are updated

Order Tests

Test

Expected Result

Paid simple product order

Odoo sales order/invoice is created correctly

Paid variable product order

Correct Odoo variant is used

Pending payment order

Does not create final invoice unless configured

Cancelled order

Odoo record is cancelled or left unchanged based on rules

Refunded order

Credit note is created if configured

Partial refund

Partial credit note is created if supported

Coupon order

Discount is shown correctly

Shipping order

Shipping line appears correctly

Taxed order

Odoo and WooCommerce totals match

Payment Tests

Test

Expected Result

Stripe payment

Correct Odoo payment journal is used

PayPal payment

Correct Odoo payment journal is used

Bank transfer

Correct unpaid or manual payment flow is used

Failed payment

No final invoice is created

Transaction ID

Payment reference is stored in Odoo

The goal is not just to check that the sync runs.

The goal is to check that the data lands in the correct place.

Data Reconciliation Testing

After test orders are synced, compare the data in both systems.

The WooCommerce order total should match the Odoo order or invoice total.

Check:

  • Product line totals

  • Product quantities

  • Discounts

  • Shipping charges

  • Tax amounts

  • Order total

  • Payment status

  • Customer details

  • Billing address

  • Shipping address

  • Stock movement

  • Refund totals

A good reconciliation test should answer:

Does the Odoo record match the WooCommerce order?

If the answer is no, identify whether the difference is caused by product mapping, tax mapping, discount mapping, shipping mapping, payment mapping, or currency settings.

Logging and Error Tracking

Every WooCommerce to Odoo sync should have logs.

Logs are important because they show what happened when the sync ran.

Without logs, troubleshooting becomes guesswork.

A useful sync log should include:

Log Data

Purpose

Sync Type

Product, customer, order, invoice, payment, stock

WooCommerce Record ID

Identifies the source record

Odoo Record ID

Identifies the destination record

Sync Status

Success, failed, skipped, retrying

Error Message

Explains why the sync failed

Request Payload

Shows what was sent to Odoo

Response Payload

Shows what Odoo returned

Timestamp

Shows when the sync happened

Retry Count

Shows whether the sync has retried

User / Trigger

Shows whether sync was automatic or manual

Logs should be readable by technical users.

Where possible, they should also be understandable by support staff or administrators.

A good log message should say what failed and why.

For example:

Poor log message:

Sync failed

Better log message:

Order #1054 failed to sync because product SKU TSHIRT-M-BLK was not found in Odoo product.product -> default_code

This gives the administrator a clear action.

Failed Sync Handling

Failed syncs will happen.

A product may be missing.

A customer may have invalid data.

Odoo may reject a tax field.

The API may timeout.

The important thing is that failures are handled safely.

A failed sync should not silently disappear.

A good failed sync process should:

  1. Mark the record as failed.

  2. Store the error message.

  3. Allow the user to retry.

  4. Prevent duplicate records on retry.

  5. Notify the administrator if needed.

  6. Allow manual correction of the issue.

  7. Keep a record of what happened.

For example, if a WooCommerce order fails because the product SKU does not exist in Odoo, the integration should not keep creating new failed attempts with no explanation.

It should identify the missing SKU and allow the user to fix the product mapping before retrying the order.

Retry Logic

Retry logic is important for temporary errors.

Some failures are not caused by bad data.

They may be caused by:

  • API timeout

  • Network issue

  • Odoo server unavailable

  • Rate limit

  • Temporary authentication problem

  • Background process interruption

In these cases, retrying the sync can fix the problem.

However, retry logic needs to be controlled.

The sync should not retry forever.

A practical retry setup may be:

Attempt

Timing

First Attempt

Immediate

Retry 1

After 1 minute

Retry 2

After 5 minutes

Retry 3

After 15 minutes

Final Failure

Mark as failed and notify admin

The sync should also be idempotent.

This means if the same order is retried, it should not create duplicate Odoo records.

For example, before creating a new Odoo sales order, the sync should check whether that WooCommerce order has already been synced.

This may involve storing:

Reference

Example

WooCommerce Order ID in Odoo

Custom field such as x_woocommerce_order_id

Odoo Sales Order ID in WooCommerce

Order meta field

Odoo Invoice ID in WooCommerce

Order meta field

Sync Status in WooCommerce

Custom order meta

This allows the sync to safely retry without duplicating records.

Background Processing

WooCommerce to Odoo syncing should usually run in the background.

This is especially important for:

  • Large product catalogues

  • Bulk product syncs

  • Order imports

  • Customer imports

  • Image syncing

  • Stock updates

  • Retry queues

If sync tasks run during a normal page load or checkout process, the customer experience may be affected.

For example, if WooCommerce waits for Odoo to create a customer, sales order, invoice, payment, and stock movement during checkout, the checkout may become slow or fail.

A better approach is to:

  1. Let WooCommerce complete checkout.

  2. Add the sync task to a background queue.

  3. Process the sync in the background.

  4. Store the sync result.

  5. Show the admin whether the sync succeeded or failed.

This gives a better customer experience and makes sync failures easier to manage.

API and Authentication Errors

WooCommerce and Odoo communicate through APIs.

This means the sync depends on valid connection details.

Common API issues include:

Error

Possible Cause

Authentication failed

Incorrect Odoo username, password, API key, or database

Database not found

Wrong Odoo database name

Access denied

Odoo user does not have permission

Field does not exist

Odoo version or module mismatch

Record not found

Product, customer, tax, or journal missing

Timeout

Odoo server slow or unavailable

Invalid value

Incorrect field format

Duplicate constraint

Record already exists

Connection settings should be tested before syncing live data.

The integration should confirm:

  • Odoo URL is correct

  • Database name is correct

  • Username is correct

  • API key or password is correct

  • Odoo user has the correct permissions

  • Required Odoo modules are installed

  • Required fields exist in the Odoo version being used

A basic connection test should be available from the WooCommerce admin.

Version and Module Differences

Odoo setups can vary.

One business may use Odoo Online.

Another may use Odoo.sh.

Another may use a self-hosted Odoo instance.

They may also use different Odoo versions and installed modules.

This matters because some models, fields, or workflows may be different depending on the Odoo setup.

For example:

  • Sales module may or may not be installed.

  • Accounting module may have different access depending on the edition.

  • Inventory module may not be used.

  • Variants may not be enabled.

  • Custom fields may exist.

  • Custom workflows may be added.

  • Taxes and journals may be configured differently.

Before troubleshooting the sync, confirm the Odoo environment.

Important questions include:

  • What Odoo version is being used?

  • Is it Odoo Online, Odoo.sh, or self-hosted?

  • Is the Sales module installed?

  • Is the Accounting module installed?

  • Is the Inventory module installed?

  • Are product variants enabled?

  • Are taxes configured?

  • Are payment journals configured?

  • Are there custom fields or custom modules?

  • Does the API user have enough permissions?

Many sync issues are actually Odoo configuration issues rather than integration bugs.

Duplicate Record Prevention

Duplicate records can happen across products, customers, orders, and invoices.

The integration should be designed to prevent duplicates.

Common duplicate risks include:

Duplicate Type

Cause

Duplicate Product

Missing or duplicate SKU

Duplicate Customer

Weak customer matching rule

Duplicate Sales Order

Retry creates a new order each time

Duplicate Invoice

Invoice sync runs more than once

Duplicate Payment

Payment sync does not check transaction ID

Duplicate Attribute

Attribute names not standardised

Duplicate Category

Auto-created categories without matching

To prevent duplicates, the sync should use clear external references.

For example:

WooCommerce Data

Odoo Storage

WooCommerce Product ID

Custom field on product.template or product.product

WooCommerce Variation ID

Custom field on product.product

WooCommerce Customer ID

Custom field on res.partner

WooCommerce Order ID

Custom field on sale.order or account.move

WooCommerce Transaction ID

Payment reference on account.payment

This allows the sync to check whether a record already exists before creating a new one.

Monitoring the Sync After Launch

Once the integration is live, it should be monitored.

Do not assume that a sync is working just because it worked during testing.

After launch, monitor:

  • Failed syncs

  • Pending syncs

  • Retry queue

  • Duplicate records

  • Order totals

  • Invoice totals

  • Payment status

  • Stock differences

  • API errors

  • Authentication errors

  • Slow sync jobs

A useful admin dashboard might show:

Metric

Purpose

Last Successful Sync

Confirms recent activity

Failed Orders

Shows orders needing attention

Failed Products

Shows product mapping problems

Failed Customers

Shows customer data issues

Pending Queue

Shows backlog

Retry Count

Shows repeated failures

API Connection Status

Confirms Odoo access

Last Error Message

Helps troubleshooting

The business should also have a process for reviewing failed syncs.

For example:

  • Daily review during the first week after launch

  • Weekly review after the sync is stable

  • Immediate alert for payment or invoice failures

  • Monthly reconciliation between WooCommerce and Odoo

Maintenance and Ongoing Support

A WooCommerce to Odoo sync needs maintenance because both systems can change.

WooCommerce may update.

WordPress may update.

Odoo may update.

Plugins may change checkout fields.

Payment gateways may change metadata.

Tax rules may change.

Product structures may change.

New custom fields may be added.

Because of this, the integration should be reviewed regularly.

Maintenance should include:

  • Checking sync logs

  • Reviewing failed records

  • Testing after WooCommerce updates

  • Testing after Odoo updates

  • Checking API credentials

  • Reviewing product SKU quality

  • Checking duplicate customers

  • Checking tax mapping

  • Checking payment journal mapping

  • Checking stock reconciliation

  • Updating field mappings when business processes change

The integration should be treated as part of the business system, not just a plugin that is installed and forgotten.

Go-Live Checklist

Before launching the sync, confirm the following:

  • WooCommerce staging site has been tested.

  • Odoo test database has been tested.

  • Products are mapped correctly.

  • All products and variations have unique SKUs.

  • Customers are matched correctly.

  • Guest checkout is supported.

  • Orders sync at the correct WooCommerce status.

  • Taxes have been tested.

  • Shipping has been tested.

  • Coupons and discounts have been tested.

  • Payments map to the correct Odoo journals.

  • Refunds and credit notes have been tested.

  • Stock behaviour has been confirmed.

  • Sync logs are enabled.

  • Failed syncs are visible.

  • Retry logic is configured.

  • Duplicate prevention is configured.

  • API credentials are correct.

  • Odoo user permissions are correct.

  • Admin team knows how to review failed syncs.

  • Finance team has checked invoice and payment outputs.

  • Warehouse or fulfilment team has checked stock and delivery outputs.

Do not go live until the core scenarios have been tested.

Common Troubleshooting Questions

When something goes wrong, start with these questions:

  • Did the WooCommerce order actually trigger the sync?

  • Is the sync stuck in a queue?

  • Is there an error log?

  • Was the customer found or created in Odoo?

  • Was the product found in Odoo?

  • Was the correct SKU used?

  • Did the order create a sales order?

  • Did the invoice create successfully?

  • Did the payment create successfully?

  • Did the tax mapping apply correctly?

  • Did the shipping line sync?

  • Did a duplicate record already exist?

  • Did the API user have permission?

  • Did Odoo reject a required field?

  • Did the sync retry?

  • Was the issue caused by data, configuration, or connection?

This helps separate the problem into one of three categories:

  1. Data issue

  2. Configuration issue

  3. Connection/API issue

Most problems will fall into one of these.

Common Sync Problems

Problem

Likely Cause

Orders not syncing

Queue not running, trigger missing, or API issue

Product not found

SKU missing or not matched to Odoo default_code

Customer duplicated

Matching rule not strict enough

Invoice total mismatch

Tax, discount, or shipping mapping issue

Payment not marked paid

Journal or transaction mapping issue

Stock mismatch

Wrong warehouse or stock location

Refund missing

Credit note sync not enabled

Sync timeout

Process running too much data at once

Odoo rejects field

Version, permission, or module mismatch

Duplicate sales orders

Retry logic not idempotent

The error log should make it clear which of these has happened.

Final Thoughts

Testing and maintenance are what turn a WooCommerce to Odoo integration from a basic connection into a reliable business system.

The goal is not only to make data move between WooCommerce and Odoo.

The goal is to make sure the right data moves, at the right time, into the right records, without creating duplicates or breaking business processes.

Before launch, test the core scenarios carefully.

After launch, monitor the sync regularly.

When errors happen, use logs, retry logic, and clear mapping rules to resolve them safely.

A good WooCommerce to Odoo sync should not be a black box.

It should be visible, traceable, testable, and maintainable.

That is what allows WooCommerce to continue working as the customer-facing storefront, while Odoo becomes the reliable backend system for sales, accounting, inventory, invoices, payments, and reporting.

Share on social media