Initial commit
This commit is contained in:
30
fusion_inventory_sync/models/sync_log.py
Normal file
30
fusion_inventory_sync/models/sync_log.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class FusionSyncLog(models.Model):
|
||||
"""Log sync operations for auditing and debugging."""
|
||||
_name = 'fusion.sync.log'
|
||||
_description = 'Inventory Sync Log'
|
||||
_order = 'create_date desc'
|
||||
_rec_name = 'summary'
|
||||
|
||||
config_id = fields.Many2one('fusion.sync.config', string='Sync Config',
|
||||
required=True, ondelete='cascade')
|
||||
direction = fields.Selection([
|
||||
('pull', 'Pull (Remote -> Local)'),
|
||||
('push', 'Push (Local -> Remote)'),
|
||||
], string='Direction', required=True)
|
||||
sync_type = fields.Selection([
|
||||
('product', 'Product Catalog'),
|
||||
('stock', 'Stock Levels'),
|
||||
('full', 'Full Sync'),
|
||||
], string='Type', required=True)
|
||||
status = fields.Selection([
|
||||
('success', 'Success'),
|
||||
('partial', 'Partial'),
|
||||
('error', 'Error'),
|
||||
], string='Status', required=True)
|
||||
summary = fields.Char(string='Summary')
|
||||
details = fields.Text(string='Details')
|
||||
product_count = fields.Integer(string='Products Affected')
|
||||
Reference in New Issue
Block a user