odoo-woocommerce-bridge
Sync Odoo with WooCommerce: products, inventory, orders, and customers via WooCommerce REST API and Odoo external API.
Best use case
odoo-woocommerce-bridge is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Sync Odoo with WooCommerce: products, inventory, orders, and customers via WooCommerce REST API and Odoo external API.
Teams using odoo-woocommerce-bridge should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/odoo-woocommerce-bridge/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How odoo-woocommerce-bridge Compares
| Feature / Agent | odoo-woocommerce-bridge | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Sync Odoo with WooCommerce: products, inventory, orders, and customers via WooCommerce REST API and Odoo external API.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Odoo ↔ WooCommerce Bridge
## Overview
This skill guides you through building a reliable sync bridge between Odoo (the back-office ERP) and WooCommerce (the WordPress online store). It covers product catalog sync, real-time inventory updates, order import, and customer record management.
## When to Use This Skill
- Running a WooCommerce store with Odoo for inventory and fulfillment.
- Automatically pulling WooCommerce orders into Odoo as sale orders.
- Keeping WooCommerce product stock in sync with Odoo's warehouse.
- Mapping WooCommerce order statuses to Odoo delivery states.
## How It Works
1. **Activate**: Mention `@odoo-woocommerce-bridge` and describe your sync requirements.
2. **Design**: Get the field mapping table between WooCommerce and Odoo objects.
3. **Build**: Receive Python integration scripts using the WooCommerce REST API.
## Field Mapping: WooCommerce → Odoo
| WooCommerce | Odoo |
|---|---|
| `products` | `product.template` + `product.product` |
| `orders` | `sale.order` + `sale.order.line` |
| `customers` | `res.partner` |
| `stock_quantity` | `stock.quant` |
| `sku` | `product.product.default_code` |
| `order status: processing` | Sale Order: `sale` (confirmed) |
| `order status: completed` | Delivery: `done` |
## Examples
### Example 1: Pull WooCommerce Orders into Odoo (Python)
```python
from woocommerce import API
import xmlrpc.client
import os
# WooCommerce client
wcapi = API(
url=os.getenv("WC_URL", "https://mystore.com"),
consumer_key=os.getenv("WC_KEY"),
consumer_secret=os.getenv("WC_SECRET"),
version="wc/v3"
)
# Odoo client
odoo_url = os.getenv("ODOO_URL", "https://myodoo.example.com")
db = os.getenv("ODOO_DB", "my_db")
uid = int(os.getenv("ODOO_UID", "2"))
pwd = os.getenv("ODOO_PASSWORD")
models = xmlrpc.client.ServerProxy(f"{odoo_url}/xmlrpc/2/object")
def sync_orders():
# Get unprocessed WooCommerce orders
orders = wcapi.get("orders", params={"status": "processing", "per_page": 50}).json()
for wc_order in orders:
# Find or create Odoo partner
email = wc_order['billing']['email']
partner = models.execute_kw(db, uid, pwd, 'res.partner', 'search',
[[['email', '=', email]]])
if not partner:
partner_id = models.execute_kw(db, uid, pwd, 'res.partner', 'create', [{
'name': f"{wc_order['billing']['first_name']} {wc_order['billing']['last_name']}",
'email': email,
'phone': wc_order['billing']['phone'],
'street': wc_order['billing']['address_1'],
'city': wc_order['billing']['city'],
}])
else:
partner_id = partner[0]
# Create Sale Order in Odoo
order_lines = []
for item in wc_order['line_items']:
product = models.execute_kw(db, uid, pwd, 'product.product', 'search',
[[['default_code', '=', item['sku']]]])
if product:
order_lines.append((0, 0, {
'product_id': product[0],
'product_uom_qty': item['quantity'],
'price_unit': float(item['price']),
}))
models.execute_kw(db, uid, pwd, 'sale.order', 'create', [{
'partner_id': partner_id,
'client_order_ref': f"WC-{wc_order['number']}",
'order_line': order_lines,
}])
# Mark WooCommerce order as on-hold (processed by Odoo)
wcapi.put(f"orders/{wc_order['id']}", {"status": "on-hold"})
```
### Example 2: Push Odoo Stock to WooCommerce
```python
def sync_inventory_to_woocommerce():
# Get all products with a SKU from Odoo
products = models.execute_kw(db, uid, pwd, 'product.product', 'search_read',
[[['default_code', '!=', False], ['type', '=', 'product']]],
{'fields': ['default_code', 'qty_available']}
)
for product in products:
sku = product['default_code']
qty = int(product['qty_available'])
# Update WooCommerce by SKU
wc_products = wcapi.get("products", params={"sku": sku}).json()
if wc_products:
wcapi.put(f"products/{wc_products[0]['id']}", {
"stock_quantity": qty,
"manage_stock": True,
})
```
## Best Practices
- ✅ **Do:** Use **SKU** as the unique identifier linking WooCommerce products to Odoo products.
- ✅ **Do:** Run inventory sync on a **schedule** (every 15-30 min) rather than real-time to avoid rate limits.
- ✅ **Do:** Log all API calls and errors to a database table for debugging.
- ❌ **Don't:** Process the same WooCommerce order twice — flag it as processed immediately after import.
- ❌ **Don't:** Sync draft or cancelled WooCommerce orders to Odoo — filter by `status = processing` or `completed`.
## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.Related Skills
wordpress-woocommerce-development
WooCommerce store development workflow covering store setup, payment integration, shipping configuration, customization, and WordPress 7.0 features: AI connectors, DataViews, and collaboration tools.
odoo-xml-views-builder
Expert at building Odoo XML views: Form, List, Kanban, Search, Calendar, and Graph. Generates correct XML for Odoo 14-17 with proper visibility syntax.
odoo-upgrade-advisor
Step-by-step Odoo version upgrade advisor: pre-upgrade checklist, community vs enterprise upgrade path, OCA module compatibility, and post-upgrade validation.
odoo-shopify-integration
Connect Odoo with Shopify: sync products, inventory, orders, and customers using the Shopify API and Odoo's external API or connector modules.
odoo-security-rules
Expert in Odoo access control: ir.model.access.csv, record rules (ir.rule), groups, and multi-company security patterns.
odoo-sales-crm-expert
Expert guide for Odoo Sales and CRM: pipeline stages, quotation templates, pricelists, sales teams, lead scoring, and forecasting.
odoo-rpc-api
Expert on Odoo's external JSON-RPC and XML-RPC APIs. Covers authentication, model calls, record CRUD, and real-world integration examples in Python, JavaScript, and curl.
odoo-qweb-templates
Expert in Odoo QWeb templating for PDF reports, email templates, and website pages. Covers t-if, t-foreach, t-field, and report actions.
odoo-purchase-workflow
Expert guide for Odoo Purchase: RFQ → PO → Receipt → Vendor Bill workflow, purchase agreements, vendor price lists, and 3-way matching.
odoo-project-timesheet
Expert guide for Odoo Project and Timesheets: task stages, billable time tracking, timesheet approval, budget alerts, and invoicing from timesheets.
odoo-performance-tuner
Expert guide for diagnosing and fixing Odoo performance issues: slow queries, worker configuration, memory limits, PostgreSQL tuning, and profiling tools.
odoo-orm-expert
Master Odoo ORM patterns: search, browse, create, write, domain filters, computed fields, and performance-safe query techniques.