The Odoo-WooCommerce Sync add-on enables synchronization between WooCommerce and Odoo. The main features are:
- WooCommerce to Odoo: Synchronize new and existing products (including variations), stock quantity levels, customers, and orders (including line items).
- Odoo to WooCommerce: Synchronize new and existing products (including variations) and stock quantity levels.
- Extended Models and Views: Enhance existing Odoo models and views for
product.template
,product.product
,res.partner
,sale.order
, andsale.order.line
to accommodate corresponding WooCommerce REST API fields. - Automated and Manual Synchronization: A built-in cron job scheduler enables regular synchronization, complemented by a dedicated button for manually triggering updates.
- Advanced Settings: Support for multiple WooCommerce websites with specific configuration options for each instance (e.g. syncing only products from WooCommerce to Odoo).
- Image Synchronization: Optionally synchronize product images from WooCommerce to Odoo and Odoo to WooCommerce. For products imported from WooCommerce that include multiple images/product image gallery, an additional product image gallery is added to the
product.template
view. - Language Filtering: Synchronize products by language (requires Polylang).
- Orders Transactions Fee Support: Integrates additional fee fields into orders processed with PayPal and Stripe (requires the respective plugins).
Some features require additional setup, as detailed in the Requirements section.
Warning
This add-on is provided without any warranty and may contain bugs as it is a recently developed solution. Testing in a controlled environment is recommended before deployment, and usage is at one's own risk.
- Performance: Updating product variations may take long, as each variable product is processed through a separate WooCommerce REST API call.
- Stock Management: If a WooCommerce product variation's "Manage Stock" setting is modified, the corresponding parent product in Odoo is removed. This requires a complete re-import of the parent product and its variations, which can be manually retriggered by pressing the
Sync Now
button. - Unique SKU Requirement: Every product must have a unique SKU. For product variations, both the parent product and each individual variation must possess a SKU. In Odoo, the internal reference field (
default_code
) should be used to store this value. - Media Endpoints: The WooCommerce REST API itself does not provide direct access to media endpoints. Instead, media management (such as uploading images) is handled by the core WordPress REST API.
Install the necessary Python packages by running:
python -m pip install filetype phonenumbers woocommerce
Tip
To automatically download and install the required and optional Odoo add-ons listed below, follow the instructions in odoo-module-dependency-installer.md.
Tip
To automatically apply the Odoo configuration listed below, follow the instructions in odoo-settings-configuration.md.
- Products & Pricelists (
product
)- The user should have Administrator privileges:
Home Menu
>Settings
>Users & Companies
>Users
> Select the user >Sales
>Sales
>Administrator
.
- The user should have Administrator privileges:
- Invoicing (
account
)- The user should have Billing Administrator privileges:
Home Menu
>Settings
>Users & Companies
>Users
> Select the user >Accounting
>Invoicing
>Billing Administrator
.
- Configure Fiscal Localization:
Home Menu
>Settings
>Invoicing
>Fiscal Localization
>Package
> Set theFiscal Localization
package (e.g.Germany SKR04 - Accounting
).
- Enable full accounting features:
Home Menu
>Settings
>Users & Company
>Groups
> Select theTechnical / Show Full Accounting Features
group >Add a line
> Select the user.
- The user should have Billing Administrator privileges:
- Sales (
sale_management
)- Enable Product Variants:
Home Menu
>Settings
>Sales
>Product Catalog
> EnableVariants
.
- Enable Product Variants:
- Inventory (
stock
)- Enable Delivery Methods:
Home Menu
>Settings
>Inventory
>Shipping
> EnableDelivery Methods
.
- (Optional) Enable Product Packagings:
Home Menu
>Settings
>Inventory
>Products
> EnableProduct Packagings
.
- Enable Units of Measure:
Home Menu
>Settings
>Inventory
>Products
> EnableUnits of Measure
.
- (Optional) Set up a dedicated warehouse for WooCommerce sales:
Home Menu
>Settings
>Inventory
>Warehouse
> EnableStorage Locations
and configure underLocations
the warehouse accordingly.
- Enable Delivery Methods:
- Contacts (
contacts
) - Job Queue (
queue_job
)- GitHub | Odoo Apps Store (requires additional configuration instructions).
While not mandatory, the following Odoo Community Association (OCA) add-ons are recommended to enhance functionality:
- Module Auto Update (
module_auto_update
): Automatically updates installed modules to their latest versions, ensuring the system remains current with minimal manual intervention. - Scheduled Actions as Queue Jobs (
queue_job_cron
): Extends the functionality ofqueue_job
and allows to run an Odoo cron as a queue job. - Product Dimension (
product_dimension
): Adds fields for length, width, height, and unit of measure, enabling detailed management of product dimensions. - Product - Many Categories (
product_multi_category
): Enhances the standard single-category assignment (categ_id
) by introducing acateg_ids
field, allowing products to be organized into multiple categories. - Product Brand Manager (
product_brand
): Adds aproduct_brand_id
field to facilitate the import and management of product brands from WooCommerce (requires WooCommerce 9.6+) (only one brand per product allowed).
Brazil:
- Módulo Fiscal Brasileiro (
l10n_br_fiscal
): Supports Cadastro de Pessoa Física (CPF), Cadastro Nacional da Pessoa Jurídica (CNPJ), local taxes, shipping costs, and electronic fiscal documents.
- WooCommerce Customer Last Login: (
woocommerce_customer_date_last_login
field): Requires the Wordfence Security plugin. - Product Language Code: (
product_language_code
field): Requires Polylang for WooCommerce and either:- Polylang Pro (which enables the
lang
argument in the WooCommerce REST API); or - The custom code snippet provided in this file, saved either into the
functions.php
file or into a code snippet plugin (e.g. WPCode).
- Polylang Pro (which enables the
- Orders Transactions Fee (
woocommerce_order_transaction_fee
field): Requires the WooCommerce PayPal Payments and/or Payment Plugins for Stripe WooCommerce plugin.- For the Payment Plugins for Stripe WooCommerce, the following setting needs to be changed in order to enable the Stripe transaction fee field:
WooCommerce
>Stripe by Payment Plugins
>Settings
>Advanced Settings
> EnableDisplay Stripe Fee
.
- For the Payment Plugins for Stripe WooCommerce, the following setting needs to be changed in order to enable the Stripe transaction fee field:
Brazil:
- Cadastro de Pessoa Física (CPF) (
l10n_br_cpf_code
field) and Cadastro Nacional da Pessoa Jurídica (CNPJ) (cnpj_cpf
field): Requires the Brazilian Market on WooCommerce plugin.
Follow these steps to install the Odoo-WooCommerce Sync add-on:
- Install Python Dependencies: Ensure the Python dependencies are installed on the Odoo instance.
- Enable Odoo Add-ons: Install and activate all required and, if applicable, optional Odoo add-ons.
- Configure WordPress (if applicable): Install and set up the optional plugins for WordPress. Retrieve the WooCommerce REST API
consumer key
andconsumer secret
fromWooCommerce
>Settings
>Advanced
>REST API
. - Add the Add-on: Download and place the
woocommerce_sync
directory into the Odooaddons
directory. - Activate Debug Mode: Log in to Odoo and enable Debug Mode.
- Update the Apps List: Navigate to
Home Menu
>Apps
and click Update Apps List. - Activate the Add-on: Use the filter to search for
woocommerce_sync
and activate the add-on.
The add-on is configured through the WooCommerce Sync configuration, accessible via Home Menu
> WooCommerce Sync
.
For orders import, two optional mapping logics can be activated. By default, a product and customer (for orders placed by guest customer) placeholder/dummy is created. The options are:
- Guest Customers Mapping: When enabled, orders placed by guest (unregistered) customers are matched to existing Odoo customers using their email addresses. If no matching customer exists, a new record is created automatically. When disabled, a customer placeholder (
ref = WooCommerce_Customer_Placeholder
) is assigned to the order. - Line Items Product Mapping: When enabled, each line item is mapped to an existing Odoo product using the
woocommerce_product_id
. If no match is found, a product placeholder is used. When disabled, all order line items are assigned to a placeholder product (default_code = WooCommerce_Product_Placeholder
) while still displaying the WooCommerce product name. This option is not recommended since product details in WooCommerce may change over time, complicating accurate mapping.
This module is an independent third-party integration. It is not affiliated with, endorsed by, or sponsored by Odoo S.A. or Automattic Inc.
All copyrights and trademarks are the property of their respective owners.
- Odoo-Shore POS Sync: Connector add-on for Odoo that synchronizes data between Shore POS and Odoo.