from odoo import fields, models


class WooShipment(models.Model):
    _name = 'woo.shipment'
    _description = 'WooCommerce Shipment'

    order_id = fields.Many2one('woo.order', required=True, ondelete='cascade')
    picking_id = fields.Many2one('stock.picking')
    carrier_id = fields.Many2one('woo.shipping.carrier')
    tracking_number = fields.Char()
    shipped_date = fields.Datetime()
    is_backorder = fields.Boolean()
    synced_to_woo = fields.Boolean()
    company_id = fields.Many2one(
        'res.company', required=True, default=lambda self: self.env.company,
    )
