<!-- Copyright 2021 Patrick Wilson <patrickraymondwilson@gmail.com>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).-->
<odoo>
    <record id="sale_order_tag_list_view" model="ir.ui.view">
        <field name="name">sale.order.tag.list</field>
        <field name="model">sale.order.tag</field>
        <field name="arch" type="xml">
            <list editable="top">
                <field name="sequence" widget="handle" />
                <field name="name" />
                <field name="description" />
                <field name="team_ids" widget="many2many_tags" />
                <field name="company_id" />
            </list>
        </field>
    </record>
    <record id="sale_order_tag_form_view" model="ir.ui.view">
        <field name="name">sale.order.tag.form</field>
        <field name="model">sale.order.tag</field>
        <field name="arch" type="xml">
            <form string="Sale Order Tags">
                <sheet>
                    <div class="oe_button_box" name="button_box">
                        <button
                            name="toggle_active"
                            type="object"
                            class="oe_stat_button"
                            icon="fa-archive"
                        >
                            <field
                                name="active"
                                widget="boolean_button"
                                options='{"terminology": "archive"}'
                            />
                        </button>
                    </div>
                    <div class="oe_title">
                        <label for="name" class="oe_edit_only" string="Name" />
                        <h1>
                            <field name="name" />
                        </h1>
                    </div>
                    <group>
                        <field name="team_ids" widget="many2many_tags" />
                        <field name="company_id" />
                    </group>
                    <group>
                        <field name="description" />
                    </group>
                </sheet>
            </form>
        </field>
    </record>
    <record id="sale_order_tag_action" model="ir.actions.act_window">
        <field name="name">Sale Order Tags</field>
        <field name="res_model">sale.order.tag</field>
        <field name="view_mode">list,form</field>
    </record>
    <menuitem
        name="Sale Order Tags"
        id="sale_order_tag_menu"
        parent="sale.menu_sales_config"
        action="sale_order_tag_action"
        sequence="20"
    />
</odoo>
