<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <!-- Client action embedding /odoo/attendances/my in an iframe,
             same pattern as the My Team / company-wide pages. -->
        <record id="action_attendance_my_client" model="ir.actions.client">
            <field name="name">My Attendance</field>
            <field name="tag">xeno_attendance_my</field>
        </record>
    </data>
    <data noupdate="1">
        <!-- susu (2026-07-20): regular employees should see ONE "My
             Attendance" tab and nothing else attendance-related, not the
             native "Attendances" app (kiosk/Management/Reporting/
             Configuration, all Officer/Admin tooling they have no use for).
             This reverts the earlier relaxation below (both root and
             Overview go back to core's own Officer-only default) and instead
             promotes My Attendance to its own standalone top-level tab, so it
             no longer depends on a parent that's hidden from regular users.
             "Employees" (the per-employee attendance list, the other child of
             Overview) and everything else under the native app remain
             Officer/Admin-only, unaffected. -->
        <record id="hr_attendance.menu_hr_attendance_root" model="ir.ui.menu">
            <field name="group_ids" eval="[(3, ref('base.group_user'))]"/>
        </record>
        <record id="hr_attendance.menu_hr_attendance_overview" model="ir.ui.menu">
            <field name="group_ids" eval="[(3, ref('base.group_user'))]"/>
        </record>

        <!-- Standalone top-level tab (no parent): the route only ever renders
             the caller's own xeno_employee_code, so no group gate beyond
             "any internal user" is needed. A user whose employee record isn't
             linked yet sees a "contact HR" note. Reuses hr_attendance's own
             icon (picks up the existing fa-clock-o mapping in app_icons.js
             with no changes needed there). -->
        <menuitem id="menu_attendance_my"
                  name="My Attendance"
                  action="action_attendance_my_client"
                  web_icon="hr_attendance,static/description/icon.png"
                  groups="base.group_user"
                  sequence="27"/>
    </data>
</odoo>
