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>
This commit is contained in:
34
fusion-woo-odoo/fusion_woocommerce/models/woo_product_map.py
Normal file
34
fusion-woo-odoo/fusion_woocommerce/models/woo_product_map.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class WooProductMap(models.Model):
|
||||
_name = 'woo.product.map'
|
||||
_description = 'WooCommerce Product Mapping'
|
||||
|
||||
instance_id = fields.Many2one('woo.instance', required=True, ondelete='cascade')
|
||||
product_id = fields.Many2one('product.product')
|
||||
woo_product_id = fields.Integer()
|
||||
woo_product_name = fields.Char()
|
||||
woo_sku = fields.Char()
|
||||
woo_product_type = fields.Selection([
|
||||
('simple', 'Simple'),
|
||||
('variable', 'Variable'),
|
||||
('grouped', 'Grouped'),
|
||||
('external', 'External'),
|
||||
])
|
||||
woo_parent_id = fields.Integer()
|
||||
is_variation = fields.Boolean()
|
||||
sync_price = fields.Boolean(default=True)
|
||||
sync_inventory = fields.Boolean(default=True)
|
||||
sync_images = fields.Boolean(default=True)
|
||||
woo_image_ids = fields.Char() # JSON
|
||||
last_synced = fields.Datetime()
|
||||
company_id = fields.Many2one(
|
||||
'res.company', required=True, default=lambda self: self.env.company,
|
||||
)
|
||||
state = fields.Selection([
|
||||
('unmapped', 'Unmapped'),
|
||||
('mapped', 'Mapped'),
|
||||
('conflict', 'Conflict'),
|
||||
('error', 'Error'),
|
||||
], default='unmapped')
|
||||
Reference in New Issue
Block a user