Commit Graph

82 Commits

Author SHA1 Message Date
gsinghpal
bc2bba14aa fix: redesign product creation wizard — use Odoo statusbar, clean layout
- 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>
2026-04-01 16:23:07 -04:00
gsinghpal
b83c9fd318 fix: auto-refresh product list when category filter wizard closes
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>
2026-04-01 16:11:36 -04:00
gsinghpal
5e806745da feat: persistent hidden categories with wizard and toggle
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>
2026-04-01 16:06:15 -04:00
gsinghpal
52be90c10d feat: category filter dropdown on unmatched Odoo products panel
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>
2026-04-01 15:56:13 -04:00
gsinghpal
9f0badfb7e fix: AI prompt fields use full width instead of narrow column
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>
2026-04-01 15:45:18 -04:00
gsinghpal
c46e4c0b28 feat: AI model selection dropdown with Claude and OpenAI models
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>
2026-04-01 15:36:23 -04:00
gsinghpal
c169704687 chore: bump version to 19.0.2.0.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 14:50:06 -04:00
gsinghpal
4efd5066d0 feat: AI-powered product creation wizard with SEO and image geo-tagging
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>
2026-04-01 14:44:48 -04:00
gsinghpal
f759bf558f feat: add AI service (Claude + OpenAI) and image processor with EXIF geo-tagging
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>
2026-04-01 14:39:44 -04:00
gsinghpal
3493c43916 feat: add category mapping model and AI settings on woo.instance
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>
2026-04-01 14:30:02 -04:00
gsinghpal
3179cc1f7b feat: add editable WC SKU and Odoo SKU columns with bidirectional sync
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>
2026-04-01 13:32:26 -04:00
gsinghpal
1a1a37b3e3 feat: add Fusion WooCommerce app icon
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:34:52 -04:00
gsinghpal
3de513fb7b fix: round edit values — margin shows whole number, prices show 2 decimals
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 11:44:10 -04:00
gsinghpal
4941df8131 fix: remove decimal points from margin percentage — whole numbers only
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 11:41:50 -04:00
gsinghpal
b3fb2ef40c feat: add Cost and Margin % columns with inline editing
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>
2026-04-01 11:38:37 -04:00
gsinghpal
c5b519f8f4 feat: inline-editable prices in product mapping UI
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>
2026-04-01 11:23:23 -04:00
gsinghpal
8354e82dc4 changes 2026-04-01 01:32:30 -04:00
gsinghpal
8b723086b9 docs: add CLAUDE.md for both fusion_woocommerce and fusion-woodoo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 01:02:21 -04:00
gsinghpal
80f9ddd0d6 feat: WC standard price + sale price with smart sync logic
- 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>
2026-03-31 23:19:01 -04:00
gsinghpal
b1e4ed5ec8 feat: clickable WooCommerce product links in mapping UI
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>
2026-03-31 23:06:27 -04:00
gsinghpal
0e84b97c89 fix: sync never changes product map state from mapped
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>
2026-03-31 23:01:26 -04:00
gsinghpal
1cc3ea7a18 fix: health check no longer changes instance state
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>
2026-03-31 22:53:53 -04:00
gsinghpal
f9fcb6612b feat: add pagination, individual price sync arrows, and bulk price sync
- 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>
2026-03-31 22:51:07 -04:00
gsinghpal
80b7d3d620 fix: OWL template error — Number() not available in template context
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>
2026-03-31 22:39:50 -04:00
gsinghpal
cec499e9e9 fix: handle null/zero prices in mapping UI template
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>
2026-03-31 22:38:27 -04:00
gsinghpal
3ea283247a feat: add Refresh Prices button to pull WC prices for existing mappings
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>
2026-03-31 22:35:13 -04:00
gsinghpal
919dbcb4cf feat: add WC Price and Odoo Price columns to product mapping UI
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>
2026-03-31 22:32:42 -04:00
gsinghpal
ab16040eb4 fix: add missing action_fetch_products and action_sync methods
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>
2026-03-31 22:28:35 -04:00
gsinghpal
396f895ae2 fix: proper Odoo 19 dark mode detection via cookie-based theme_detect.js
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>
2026-03-31 22:21:17 -04:00
gsinghpal
c5d2ac1d6b fix: thorough dark mode fixes across all OWL templates and CSS
- Replace Bootstrap badge classes with theme-aware woo-badge classes in
  product mapping tabs
- Replace <code> with theme-aware .woo-code class
- Replace all text-muted with woo-text-muted using CSS custom properties
- Add client action wrapper background
- Add theme-aware select/checkbox/strong/input overrides
- Add .woo-code, .woo-text-muted, .woo-text-faint utility classes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:12:10 -04:00
gsinghpal
645119c9b7 fix: theme-aware CSS with dark mode support
Replace all hardcoded colours with CSS custom properties. Dark mode
overrides via html.o_dark / body.o_dark / [color-scheme: dark] selectors
matching Odoo 19's theme system.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:09:07 -04:00
gsinghpal
84f01ebd7b fix: remove deprecated attrs/states attributes for Odoo 19 compatibility
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>
2026-03-31 21:43:03 -04:00
gsinghpal
5d361d8c8a fix: Odoo 19 compatibility — tree→list views, remove search group wrappers, remove numbercall
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:40:53 -04:00
gsinghpal
ad50c579c3 feat: add communication history push, invoice auto-trigger, health checks, rate limiting
- 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>
2026-03-31 21:02:15 -04:00
gsinghpal
cc35c28760 feat: implement returns/refunds, customer sync, tax/pricelist mapping
- Add woo.return workflow: action_approve (creates reverse picking),
  action_reject, action_receive, action_refund (creates credit note + WC refund)
- Add woo.customer._find_or_create class method for customer lookup/creation
- Replace _sync_customers placeholder to push address updates to WC
- Add _sync_customer_from_wc webhook handler for inbound customer updates
- Add woo.tax.map helpers: get_odoo_tax, get_wc_tax_class
- Add woo.pricelist.map helper: get_pricelist_for_role

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:02:07 -04:00
gsinghpal
7e302b0a27 feat: implement price, inventory, image sync and conflict resolution
- Replace _sync_products placeholder with price comparison logic that
  detects Odoo vs WC changes and creates woo.conflict on both-changed
- Replace _sync_inventory placeholder to push Odoo stock levels to WC
- Add _sync_product_from_wc webhook handler for inbound price updates
- Add action_sync_images on woo.product.map with hash-based comparison
- Add conflict resolution methods: action_use_odoo, action_use_woo,
  action_bulk_resolve_odoo, action_bulk_resolve_woo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:01:57 -04:00
gsinghpal
9c2c043de9 feat: implement order sync lifecycle (WC→Odoo SO/invoice, shipping push, completion push)
- 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>
2026-03-31 21:01:48 -04:00
gsinghpal
2dd1a2be6c feat: add WooCommerce sync dashboard widget
- 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>
2026-03-31 20:53:50 -04:00
gsinghpal
de14a28112 feat: add OWL product mapping UI with live AJAX search
- AjaxSearch component: debounced 300ms, calls /woo/search/* endpoints via rpc()
- ProductMapping client action: 3 tabs (Mapped, Unmatched, Conflicts)
  - Mapped tab: live search, bulk unmap/sync, per-row price/inventory sync toggles
  - Unmatched tab: split Odoo|WC panels, click-to-select, Map/Create/Ignore actions
  - Conflicts tab: Use Odoo / Use WC per-row and bulk resolve
- Top bar: instance selector, Fetch Products, Sync Now, live stats
- woo_dashboard.xml updated with ir.actions.client records
- woo_menus.xml pointed at new client action
- CSS: full layout styles, badges, split view, progress bar, buttons

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:53:43 -04:00
gsinghpal
1f86a7c497 feat: complete fusion-woodoo WordPress plugin with portal, REST endpoints, webhooks, and admin settings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:48:16 -04:00
gsinghpal
102fbd65f2 feat: add setup wizard and product fetch wizard with SKU auto-match
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:43:36 -04:00
gsinghpal
116c0b03bf feat: add cron jobs, sync engine scaffolding, log cleanup, and email templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:41:04 -04:00
gsinghpal
0ce599c4ac feat: add webhook, API, and product search controllers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:39:07 -04:00
gsinghpal
50dbd63dd2 feat: add all views, menus, and settings for WooCommerce module
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:36:37 -04:00
gsinghpal
7b085a87a1 feat: extend sale.order, stock.picking, account.move, res.partner with WooCommerce fields
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:10:08 -04:00
gsinghpal
fdd67c9e51 feat: add all remaining models (product map, order, shipment, customer, sync log, conflict, tax/pricelist map, returns)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:08:49 -04:00
gsinghpal
cd710065c6 feat: add woo.instance and woo.shipping.carrier models with default carriers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:08:41 -04:00
gsinghpal
2cc146b253 feat: add WooCommerce REST API v3 client wrapper
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:01:13 -04:00
gsinghpal
45775fa295 feat: scaffold fusion_woocommerce Odoo module and fusion-woodoo WP plugin directories
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:00:15 -04:00
gsinghpal
126264217e Add Fusion WooOdoo implementation plan (30 tasks, 9 phases)
Comprehensive plan covering Odoo module scaffold, core models, API client,
views/menus, sync engine (webhooks + cron), wizards, OWL frontend,
WordPress plugin, order lifecycle, advanced features (tax mapping,
pricelist sync, multi-currency, refund handling), and deployment.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 19:54:10 -04:00