WP Manifestindependent plugin directory
manifest / ecommerce / odoo-woocommerce-sync

Odoo WooCommerce Sync

A modular WordPress plugin for synchronizing WooCommerce with Odoo using JSON-RPC or XML-RPC.

by Yassine Moumen · github.com/yassinemoumenn/odoo-woocommerce-sync · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/yassinemoumenn/odoo-woocommerce-sync/archive/refs/heads/master.zip

Readme

Odoo WooCommerce Sync

A modular WordPress plugin for synchronizing WooCommerce with Odoo using JSON-RPC or XML-RPC.

Requirements

  • WordPress 6.8 or newer
  • WooCommerce 10.0 or newer
  • PHP 8.2 or newer
  • Odoo with API access enabled

Features

  • Admin settings under WooCommerce > Odoo Sync
  • JSON-RPC and XML-RPC transport support
  • Connection test button
  • Manual sync buttons for orders, products, customers, and stock
  • WP-Cron scheduled synchronization
  • Real-time hooks for order, customer, product, and stock updates
  • Dedicated log table and admin log viewer
  • SKU-based product matching
  • Email-based customer matching
  • Odoo IDs stored in WordPress post/user/order meta
  • Simple product support
  • Variable product support using Odoo variant attributes
  • Product category, image, price, tax status, and stock import
  • Retry-aware API calls with detailed logs
  • Optional uninstall cleanup

Installation

  1. Copy the odoo-woocommerce-sync folder into wp-content/plugins/.
  2. In WordPress admin, go to Plugins and activate Odoo WooCommerce Sync.
  3. Go to WooCommerce > Odoo Sync.
  4. Enter:
    • Odoo URL, for example https://odoo.example.com
    • Odoo database name
    • Odoo username
    • Odoo password or API key
    • RPC protocol
  5. Save settings.
  6. Click Test Connection.

Configuration Notes

Products are matched by SKU using Odoo product.product.default_code.

Customers are matched by email using Odoo res.partner.email.

The plugin stores remote IDs in:

  • Products and variations: _odoo_product_id
  • Variable product parents: _odoo_product_template_id
  • Orders: _odoo_sale_order_id
  • Users: _odoo_partner_id

Stock pushes use Odoo stock.quant inventory adjustments against the first active internal stock location. If your Odoo database uses multiple warehouses, customize Stock_Sync::update_odoo_stock() to select the correct location for your store.

Manual Sync

Use WooCommerce > Odoo Sync > Manual Sync to run:

  • Orders to Odoo
  • Products from Odoo to WooCommerce
  • Customers to Odoo
  • Stock from Odoo to WooCommerce

Scheduled Sync

WP-Cron runs the same synchronization jobs based on the configured frequency. For production stores, configure a real server cron to call WordPress cron reliably:

*/5 * * * * curl -s https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Logging

Logs are stored in the {prefix}odoo_wc_sync_logs database table and can be viewed from the Logs tab. Log retention is configurable.

Uninstall

By default, uninstalling the plugin leaves settings, logs, and Odoo meta in place. Enable Remove plugin settings, logs, and Odoo meta when uninstalling before uninstalling if you want cleanup.

Developer Structure

odoo-woocommerce-sync/
|-- assets/
|   |-- css/admin.css
|   `-- js/admin.js
|-- includes/
|   |-- Admin/Admin_Page.php
|   |-- Api/Odoo_Client.php
|   |-- Sync/
|   |   |-- Abstract_Sync.php
|   |   |-- Cron_Sync.php
|   |   |-- Customer_Sync.php
|   |   |-- Order_Sync.php
|   |   |-- Product_Sync.php
|   |   `-- Stock_Sync.php
|   `-- Utilities/
|       |-- Logger.php
|       `-- Settings.php
|-- odoo-woocommerce-sync.php
|-- uninstall.php
`-- README.md

Production Hardening Checklist

  • Use an Odoo API key instead of a human password.
  • Restrict the Odoo user permissions to only the models required for sync.
  • Confirm product SKUs are unique in both systems.
  • Confirm tax mapping behavior for your country and Odoo fiscal positions.
  • Confirm the correct Odoo internal stock location for your warehouse.
  • Test on staging before enabling real-time hooks on production.

Read the full README on GitHub →