Skip to content

[ADD] om_woocommerce: WooCommerce connector - #376

Merged
github-actions[bot] merged 1 commit into
19.0from
19.0-woocommerce
Nov 18, 2026
Merged

github-actions[bot] merged 1 commit into
19.0from
19.0-woocommerce

Conversation

@odoomates

Copy link
Copy Markdown
Owner

Backport of #372 to 19.0.

What and why

WooCommerce Connector for Odoo 19, on the Connector Base engine of the Shopify Connector; and the code both connectors share moved into Connector Base.

om_connector_base: an archived link is found again when the same record comes back (it hit the unique key before); shared helpers for the connectors' orders: contacts and addresses from the shop's customers, taxes found or created from the shop's rates, pricelist for the currency of an order, discount and total check, delivery of an order already shipped by the shop, credit note of a refund (with adjustment), return of the refunded products, sales tags, activity for the responsible. Now depends on sale_stock.

om_shopify: uses these helpers (same behaviour). Two fixes on the creation of products with variants:

  • a product with options such as Size or Color failed when imported by a job (the default attributes regenerate the variants, and the tracking of the template then read a deleted variant): created without tracking;
  • an attribute that creates no variant is not reused for the options of a product.

om_woocommerce (WooCommerce Connector), through the WooCommerce REST API (wc/v3):

  • Connection: approve Odoo in WordPress (WooCommerce sends the key to Odoo), or paste a REST API key; keys stored encrypted; sites without pretty permalinks reached through ?rest_route=; key in the address for servers that drop the Authorization header.
  • Setup wizard in three steps: site, settings (warehouse, journal, taxes, statuses, product matching), first imports (products, customers, orders, stock); with the approval, the imports start when WordPress sends the administrator back.
  • Webhooks created by Odoo with a secret of its own, checked with their signature, queued and answered at once; the ping of a new webhook answered; disabled webhooks turned on again by Sync Webhooks.
  • Products: simple and variable products imported (daily changes and webhooks), linked by SKU or GTIN, or created with their variations and images; CSV/Excel mapping.
  • Product export (Actions > Export to WooCommerce): simple or variable products with their variations, prices, weight, stock, category, tags and attributes; images uploaded to WordPress with an Application Password; publish and unpublish.
  • Prices from a price list, as sale prices under a regular price list, sent every day by batches.
  • Meta data of products, variations, customers and orders mapped to Odoo fields, one or both ways.
  • Coupons imported and kept in sync by webhook, made or changed in Odoo and sent, deleted from Odoo; each order lists the coupons it used.
  • Stock sent from the warehouse every 15 minutes by batches, with limits per variant; or imported.
  • Customers; guests found by email.
  • Orders by webhook, every 15 minutes or by number, in the statuses chosen on the store: coupons, shipping, fees, taxes of WooCommerce or of Odoo, prices with or without taxes, currency of the order; workflow chosen by order rules (payment method, status, created via, shipping method); each shipping method mapped to an Odoo carrier; an unpaid order cancelled in WooCommerce is cancelled with its invoice.
  • Digest KPI of the WooCommerce orders.
  • Delivered orders completed in WooCommerce with the tracking number (note to the customer, or the Shipment Tracking extension); cancellation from Odoo; refunds as paid credit notes and returns; credit notes refunded in WooCommerce, through the payment gateway if asked.

Written from scratch against the public WooCommerce REST API documentation: it contains no code of any other WooCommerce connector or third-party module.

Released as beta: store page, icon and banner included. Not yet tested against a real WooCommerce site.

How to test

  1. Install om_woocommerce on a fresh database, and run --test-tags /om_connector_base,/om_shopify,/om_woocommerce (the tests use recorded WooCommerce answers, no network).
  2. With a WooCommerce site: WooCommerce > Configuration > Connect a Store, then approve Odoo in WordPress (Odoo at a public https address) or paste a REST API key with Read/Write permission.
  3. Select products in Sales > Products, Actions > Export to WooCommerce; Import Coupons on the store.
  4. For webhooks, set the Odoo Public URL of the store to a public https address and click Sync Webhooks.

Checklist

  • The pull request targets the right version branch (20.0, 19.0 or 18.0).
  • One commit per module, named [TAG] module: summary (50 characters at most).
  • The tests of the module pass, and new tests cover the change.
  • The module installs and upgrades on a fresh database without error or warning.
  • User-facing texts are translatable.
  • A data-model change has a migration script and a higher version in __manifest__.py (no data-model change in om_connector_base and om_shopify; om_woocommerce is new).
  • I have read and follow the AI contribution policy.

@odoomates

Copy link
Copy Markdown
Owner Author

/mergebot r+

@github-actions
github-actions Bot merged commit 907d0b9 into 19.0 Nov 18, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Merging now. Then version bump (patch).

@github-actions

Copy link
Copy Markdown
Contributor

Version bump (patch) on 19.0: om_shopify 1.0 -> 1.0.1.

@github-actions
github-actions Bot deleted the 19.0-woocommerce branch November 18, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant