from odoo import fields, models


class WooTaxMap(models.Model):
    _name = 'woo.tax.map'
    _description = 'WooCommerce Tax Mapping'

    instance_id = fields.Many2one('woo.instance', required=True, ondelete='cascade')
    tax_id = fields.Many2one('account.tax', required=True)
    woo_tax_class = fields.Char(required=True)
    woo_tax_class_name = fields.Char()
    company_id = fields.Many2one(
        'res.company', required=True, default=lambda self: self.env.company,
    )
