Onchange wasn't firing when wizard opened via context defaults. Moved all
variant line population to default_get so lines are pre-filled immediately.
Added debug logging to trace new vs update classification.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Update path sends attributes per variation (was missing, causing
"Any COLOR..." on WC)
- Sets default_attributes on parent product (first variant's values)
- Better API error logging with response body
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Already synced variants are editable — change price, SKU, image and click
Save & Sync to update them on WooCommerce. New variants are created,
existing ones updated in a single action. Button shows on all products
with variants (purple for new, grey for already synced).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced direct push with a wizard that shows all variants in an editable
table. User can review/edit standard price, sale price, SKU, and image
per variant before pushing. Include/exclude toggle per variant. Already
synced variants shown for reference. Geo-tags images if configured.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed separate Variants column — button now appears right next to the
Odoo product name so it's visible without scrolling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When a mapped product is simple on WC but has variants in Odoo, a purple
"N variants" button appears in the Variants column. Clicking it:
1. Converts the WC product from simple to variable
2. Creates WC attributes and terms from Odoo attribute lines
3. Creates a WC variation for each Odoo variant with price/SKU/stock/tax/image
4. Creates woo.product.map records for each variation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Search endpoint now queries product.template instead of product.product,
so a product with 20 variants shows as 1 row with a "20 variants" badge
instead of 20 duplicate rows. Category name shown in sub-text.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Detects Odoo product variants (product.template.attribute_line) and creates
WC variable products with attributes and variations. Each variation gets
its own price, SKU, image, stock, and tax class. Variant lines shown in
wizard with include/exclude toggle. WC attributes and terms auto-created.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tax mapping and pricelist mapping now live directly on the instance
form under Sync Settings. Added Fetch WC Tax Classes button that pulls
tax classes from WC API and auto-matches. Removed standalone menu items.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replaced hardcoded badge step indicator with Odoo's native statusbar widget
- Removed all hardcoded Bootstrap colour classes (bg-primary, text-muted, etc.)
- Using oe_highlight and oe_link for buttons (theme-aware)
- Cleaner 2-column layout for basic info and review steps
- Full-width separators and fields for content step
- Images in 2-column grid
- SEO meta fields use proper group layout
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Used doAction onClose callback instead of await — the wizard dialog
close now triggers reload of excluded count and product list. Same
fix applied to product creation wizard.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Categories to hide are stored on woo.instance and persist across sessions.
Click 'Hidden (N)' button to open wizard where you can add/remove categories
using a tag picker. Eye/eye-slash toggle to quickly apply or unapply the
filter without losing the saved list.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Filter by Odoo product category or clear filter. Backend supports
both include and exclude category filtering. Loads all categories
on init for the dropdown.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed group wrappers around prompt fields. Using label + field pattern
directly inside the page so prompts span the full available width.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced free-text model field with Selection showing standard models
from both providers: Claude Opus/Sonnet/Haiku and OpenAI GPT-4o/4.1/o3.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4-step wizard: Basic Info → Images → Content & SEO → Review & Create.
AI generates product titles, descriptions, meta data using Claude or OpenAI.
Image geo-tagging with company EXIF data. SEO meta pushed to Rank Math,
Yoast, AIOSEO, and SEOPress simultaneously. Products created with CAPS
name in Odoo, Title Case in WooCommerce.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AIService wraps both Anthropic Claude and OpenAI APIs for product content
generation. ImageProcessor handles EXIF geo-tagging with company info and
GPS coordinates using piexif.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Category mapping between Odoo product categories and WC categories with
auto-match by name and manual mapping UI. AI settings for Claude/OpenAI
with customizable prompts for product content generation. GPS coordinates
for image geo-tagging pulled from company settings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both SKU fields are inline-editable. Arrow buttons sync individual SKUs.
Bulk buttons sync all SKUs Odoo→WC or WC→Odoo.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cost column shows Odoo standard_price (editable). Margin % is calculated
from cost and sale price. Editing margin auto-calculates the sale price
using: price = cost / (1 - margin/100). All cells are inline-editable.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Click any price cell (WC Standard, WC Sale, Odoo Price) to edit inline.
Enter or click away saves and syncs to the source. Escape cancels.
Validation: sale price cannot exceed standard price.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Split woo_price into woo_regular_price and woo_sale_price
- Sync to WC: if standard=0 sets regular_price, otherwise sets sale_price
- Validation: standard price cannot be less than sale price
- Both prices shown in mapping UI with sale price highlighted in green
- Refresh Prices pulls both values from WC API
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Product names in the mapped table are now links that open the WC product
page in a new tab. Added woo_permalink field, stored during fetch,
returned by search endpoint.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Price conflicts and sync errors were setting woo.product.map state to
'conflict'/'error', making products disappear from the mapped list.
Conflicts are now tracked only in woo.conflict model. Map state stays
'mapped' as long as the product link exists.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The health check cron runs inside Docker which can't always reach
external URLs. It was setting state to 'error' breaking fetch/sync.
Now it only logs warnings — state changes only via explicit Test
Connection button.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pagination with page nav for mapped, unmatched Odoo, and unmatched WC tabs
- Per-product arrow buttons to push price in either direction
- Bulk price sync buttons: All Prices Odoo→WC and All Prices WC→Odoo
- Server-side offset/limit with total count in search endpoints
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use a formatPrice() method on the component instead of calling Number()
directly in the OWL template. Fixes TypeError: ctx.Number is not a function.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
toFixed() was failing on null values. Now uses explicit null/undefined
checks so $0.00 prices display correctly instead of showing dashes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Existing mapped products had no WC price since they were fetched before
the woo_price field existed. action_refresh_prices fetches current prices
from WC API for all mapped products.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added woo_price field to woo.product.map model, populated during fetch.
Search endpoint now returns both odoo_price and woo_price for side-by-side
comparison in the mapped products table.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Product mapping UI called these methods but they didn't exist on
woo.instance. action_fetch_products fetches WC products via API,
auto-matches by SKU, handles variations. action_sync runs all
enabled sync types manually.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Odoo 19 does NOT use .o_dark class or data-bs-theme attribute. It sets
color-scheme via SCSS and stores preference in color_scheme cookie.
Added theme_detect.js that reads the cookie and sets data-woo-theme="dark"
on <html> for reliable CSS targeting. Fixed CSS dark mode selectors.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Converted all attrs= expressions to inline invisible/readonly attributes
in wizard XML views (woo_product_fetch_views.xml, woo_setup_wizard_views.xml).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Override account.move action_post to auto-push invoice PDF to WC on posting
- Add _cron_health_check to ping all instances and flag unreachable ones
- Add health check cron record (every 10 minutes) to data/cron.xml
- Add IP-based rate limiting (100 req/min) to webhook controller
- Fill in API endpoints: order/documents, order/status, order/messages
with real data from woo.order, stock.picking, and mail.message
- Implement return/create API endpoint with product mapping and line creation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace _sync_orders placeholder with full WC order import pipeline
- Add _sync_order_from_wc, _find_or_create_customer, _prepare_sale_order_vals,
_prepare_order_line_vals, _prepare_shipping_line_vals helpers
- Add push methods on woo.order: action_push_shipping, action_push_completed,
action_push_invoice_pdf, action_push_delivery_pdf, _push_messages_to_wc
- Override stock.picking button_validate to auto-create shipment records and
push tracking/delivery PDFs to WooCommerce
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- WooDashboard OWL client action registered as fusion_woocommerce.woo_dashboard
- Cards: pending orders (clickable), last sync (relative time), errors 24h (clickable),
products mapped % with progress bar
- Quick actions: Sync Now, View Conflicts, Open Mapping, View Orders
- Instances table showing name, connection state, last sync datetime
- Auto-refreshes every 60 s while mounted
- All data fetched via standalone rpc() per Odoo 19 rules
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>