From 149a45a752c4d7cb27363b94158e1428eacc391e Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Tue, 31 Mar 2026 19:37:30 -0400 Subject: [PATCH] Fix remaining spec review issues (round 2) Add company_id to woo.shipment, woo.sync.log, woo.return.line. Add order_id to woo.conflict for order-type conflicts. Add _odoo_messages to WP meta table. Fix section numbering. Document lib/ import path. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../specs/2026-03-31-fusion-woo-odoo-design.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/superpowers/specs/2026-03-31-fusion-woo-odoo-design.md b/docs/superpowers/specs/2026-03-31-fusion-woo-odoo-design.md index 48929be2..33a6c200 100644 --- a/docs/superpowers/specs/2026-03-31-fusion-woo-odoo-design.md +++ b/docs/superpowers/specs/2026-03-31-fusion-woo-odoo-design.md @@ -123,6 +123,7 @@ Odoo ──── Custom REST endpoints ───→ WP Plugin (invoices, docs, | `shipped_date` | Datetime | When shipped | | `is_backorder` | Boolean | Whether this is a backorder shipment | | `synced_to_woo` | Boolean | Whether WC was notified | +| `company_id` | Many2one (res.company) | Company | #### `woo.shipping.carrier` — Configurable Carrier List @@ -144,6 +145,7 @@ Odoo ──── Custom REST endpoints ───→ WP Plugin (invoices, docs, | `state` | Selection | success / failed / conflict | | `message` | Text | Details or error message | | `create_date` | Datetime | Timestamp | +| `company_id` | Many2one (res.company) | Company | #### `woo.customer` — Customer Link Tracking @@ -196,6 +198,7 @@ Odoo ──── Custom REST endpoints ───→ WP Plugin (invoices, docs, | `product_id` | Many2one (product.product) | Product being returned | | `quantity` | Float | Quantity to return | | `reason` | Selection | defective / wrong_item / not_needed / damaged / other | +| `company_id` | Many2one (res.company) | Company | #### `woo.conflict` — Data Conflicts @@ -205,6 +208,7 @@ Odoo ──── Custom REST endpoints ───→ WP Plugin (invoices, docs, | `conflict_type` | Selection | product / customer / order | | `map_id` | Many2one (woo.product.map) | Product map (if product conflict) | | `customer_id` | Many2one (woo.customer) | Customer (if customer conflict) | +| `order_id` | Many2one (woo.order) | Order (if order conflict) | | `field_name` | Char | Which field conflicts | | `odoo_value` | Char | Value in Odoo | | `woo_value` | Char | Value in WooCommerce | @@ -225,6 +229,7 @@ Odoo ──── Custom REST endpoints ───→ WP Plugin (invoices, docs, | `_odoo_order_status` | Order | Odoo-side status for timeline | | `_odoo_product_id` | Product | Linked Odoo product ID | | `_odoo_customer_id` | User | Linked Odoo partner ID | +| `_odoo_messages` | Order | JSON array of customer-visible messages [{author, date, body}] | | `_odoo_instance_url` | Options | Odoo server URL | | `_odoo_api_key` | Options | API key for Odoo auth | @@ -652,23 +657,23 @@ fusion-woo-odoo/ - WC webhook signature validation via HMAC-SHA256 (separate from API key auth) - PDF files served through access-controlled PHP handler, not direct file URLs -## 12a. Odoo 19 Technical Requirements +## 12. Odoo 19 Technical Requirements - All HTTP controller routes must use `type="jsonrpc"` (NOT `type="json"` which is deprecated) - Frontend JS uses `Interaction` class from `@web/public/interaction` - Backend OWL components use standalone `rpc()` from `@web/core/network/rpc` - OWL components: `static props = []` not `{}` -- API client class in `lib/` directory (NOT in `models/` — would cause ORM registration errors) +- API client class in `lib/` directory (NOT in `models/` — would cause ORM registration errors). Import via `from ..lib.woo_api_client import WooApiClient` - All custom models include `company_id` field for multi-company support -## 12. Multi-Currency Support +## 13. Multi-Currency Support - Odoo currency syncs to WooCommerce product prices - Exchange rates managed in Odoo (existing currency rate feature) - Products can have different prices per currency - Invoice amounts respect the order's original currency -## 13. Target Deployments +## 14. Target Deployments | Pairing | Odoo | WordPress | |---------|------|-----------|