<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <record id="hr_professional_category_view_tree" model="ir.ui.view">
        <field name="name">hr.professional.category.tree</field>
        <field name="model">hr.professional.category</field>
        <field name="arch" type="xml">
            <tree editable="bottom">
                <field name="code" />
                <field name="name" />
                <field name="company_id" groups="base.group_multi_company" />
            </tree>
        </field>
    </record>
    <record id="hr_professional_category_tree_view_form" model="ir.ui.view">
        <field name="name">hr.professional.category.form</field>
        <field name="model">hr.professional.category</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <field name="active" invisible="1" />
                    <widget
                        name="web_ribbon"
                        title="Archived"
                        bg_color="bg-danger"
                        attrs="{'invisible': [('active', '=', True)]}"
                    />
                    <div class="oe_title">
                        <h1><field name="name" /></h1>
                    </div>
                    <group name="main_group">
                        <group>
                            <field
                                name="company_id"
                                groups="base.group_multi_company"
                            />
                            <field name="code" />
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>
    <record id="hr_professional_category_view_search" model="ir.ui.view">
        <field name="name">hr.professional.category.search</field>
        <field name="model">hr.professional.category</field>
        <field name="arch" type="xml">
            <search>
                <field
                    name="name"
                    filter_domain="['|', ('code', 'like', self), ('name', 'like', self)]"
                />
                <separator />
                <filter
                    string="Archived"
                    name="inactive"
                    domain="[('active', '=', False)]"
                />
            </search>
        </field>
    </record>
    <record id="hr_professional_category_action" model="ir.actions.act_window">
        <field name="name">Professional Category</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">hr.professional.category</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" eval="False" />
        <field name="help" type="html">
            <p
                class="oe_view_nocontent_create"
            >Click to create a Professional Category.</p>
        </field>
    </record>
    <menuitem
        id="menu_hr_professional_category_action"
        name="Professional Categories"
        parent="hr.menu_config_employee"
        action="hr_professional_category_action"
        sequence="11"
    />
</odoo>
