<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_xeno_employee_module_access_list" model="ir.ui.view">
            <field name="name">xeno.employee.module.access.list</field>
            <field name="model">xeno.employee.module.access</field>
            <field name="arch" type="xml">
                <list editable="bottom" default_group_by="module_id">
                    <field name="employee_id"/>
                    <field name="module_id"/>
                    <field name="granted_via_group" readonly="1"/>
                    <field name="enabled" widget="boolean_toggle"
                           readonly="granted_via_group"/>
                    <field name="enabled_by_id" readonly="1" optional="hide"/>
                </list>
            </field>
        </record>

        <record id="action_xeno_employee_module_access" model="ir.actions.act_window">
            <field name="name">Employee Access</field>
            <field name="res_model">xeno.employee.module.access</field>
            <field name="view_mode">list</field>
            <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">No individual access grants yet.</p>
                <p>Grants set here apply only to the one employee. If an
                Employee Group tag already grants the same module, that wins
                and this toggle is locked -- manage it from the group instead.</p>
            </field>
        </record>
    </data>
    <data noupdate="1">
        <menuitem id="menu_xeno_employee_module_access"
                  name="Employee Access"
                  parent="menu_xeno_system_access"
                  action="action_xeno_employee_module_access"
                  groups="hr.group_hr_user"
                  sequence="3"/>
    </data>
</odoo>
