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>
This commit is contained in:
gsinghpal
2026-04-01 13:32:26 -04:00
parent 1a1a37b3e3
commit 3179cc1f7b
5 changed files with 230 additions and 12 deletions

View File

@@ -772,6 +772,30 @@ class WooInstance(models.Model):
])
maps.action_push_price_to_odoo()
# ------------------------------------------------------------------
# Bulk SKU Sync (UI actions)
# ------------------------------------------------------------------
def action_bulk_sku_odoo_to_wc(self):
"""Push all Odoo SKUs to WooCommerce."""
self.ensure_one()
maps = self.env['woo.product.map'].search([
('instance_id', '=', self.id),
('state', '=', 'mapped'),
('product_id', '!=', False),
])
maps.action_push_sku_to_wc()
def action_bulk_sku_wc_to_odoo(self):
"""Pull all WC SKUs to Odoo."""
self.ensure_one()
maps = self.env['woo.product.map'].search([
('instance_id', '=', self.id),
('state', '=', 'mapped'),
('product_id', '!=', False),
])
maps.action_push_sku_to_odoo()
# ------------------------------------------------------------------
# Product / Price Sync (Task 22)
# ------------------------------------------------------------------