<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="action_xeno_employee_list" model="ir.actions.client">
            <field name="name">Employee List</field>
            <field name="tag">xeno_employee_list</field>
        </record>

        <!-- Onboarding opens a blank Employee form, i.e. the same page as
             /odoo/employees/new: onboarding a new hire is creating their
             employee record (the Policy Acknowledgment / Probation Tracking
             built earlier are fields on this same form, not separate pages).
             An act_window is used rather than an act_url to that path so it
             opens in-app without a full page reload and doesn't hardcode a
             hostname. -->
        <record id="action_xeno_hr_onboarding" model="ir.actions.act_window">
            <field name="name">Onboarding</field>
            <field name="res_model">hr.employee</field>
            <field name="view_mode">form</field>
        </record>

        <record id="action_xeno_work_schedule_config" model="ir.actions.client">
            <field name="name">Working Schedules</field>
            <field name="tag">xeno_work_schedule_config</field>
        </record>

        <record id="action_xeno_leave_type_config" model="ir.actions.client">
            <field name="name">Leave Types</field>
            <field name="tag">xeno_leave_type_config</field>
        </record>
    </data>
    <data noupdate="1">
        <!-- Shortcut duplicates into the "HR" app sidebar, per susu's request.
             These all reuse the SAME existing actions from their real homes
             (Employees app, Time Off app, xeno_attendance's own menus, etc.);
             nothing is moved, these are additional ir.ui.menu records
             pointing at the same underlying action so the page is reachable
             from both places. -->

        <!-- Organization: Departments and Approver Setup moved here (out of
             Company below) to match the requested menu structure; Organization
             Chart itself is added as a sibling from xeno_org_chart's own file. -->
        <menuitem id="menu_xeno_hr_company_departments"
                  name="Departments"
                  parent="menu_xeno_hr_organization"
                  action="hr.hr_department_kanban_action"
                  sequence="1"/>
        <menuitem id="menu_xeno_hr_company_approver_setup"
                  name="Approver Setup"
                  parent="menu_xeno_hr_organization"
                  action="action_xeno_leave_approver_config"
                  sequence="3"/>

        <!-- Company -->
        <menuitem id="menu_xeno_hr_company"
                  name="Company"
                  parent="menu_xeno_hr_root"
                  sequence="7"/>
        <menuitem id="menu_xeno_hr_company_holidays"
                  name="Holidays"
                  parent="menu_xeno_hr_company"
                  action="hr_holidays.open_view_public_holiday"
                  sequence="5"/>
        <!-- "Company Calendar" is the same Holidays page/action, just a second
             labeled entry to match the requested menu structure (no distinct
             calendar-only page exists separately from the Holidays list). -->
        <menuitem id="menu_xeno_hr_company_calendar"
                  name="Company Calendar"
                  parent="menu_xeno_hr_company"
                  action="hr_holidays.open_view_public_holiday"
                  sequence="4"/>
        <menuitem id="menu_xeno_hr_company_locations"
                  name="Locations"
                  parent="menu_xeno_hr_company"
                  action="xeno_attendance.action_xeno_attendance_location"
                  sequence="6"/>
        <menuitem id="menu_xeno_hr_company_announcements"
                  name="Announcements"
                  parent="menu_xeno_hr_company"
                  action="xeno_theme_slate.action_xeno_hr_announcement"
                  sequence="1"/>
        <menuitem id="menu_xeno_hr_company_policies"
                  name="Company Policies"
                  parent="menu_xeno_hr_company"
                  action="xeno_theme_slate.action_xeno_hr_policy"
                  sequence="2"/>
        <menuitem id="menu_xeno_hr_company_activities"
                  name="Company Activities"
                  parent="menu_xeno_hr_company"
                  action="xeno_theme_slate.action_xeno_hr_activity"
                  sequence="3"/>

        <!-- Employees -->
        <menuitem id="menu_xeno_hr_employees"
                  name="Employees"
                  parent="menu_xeno_hr_root"
                  sequence="2"/>

        <menuitem id="menu_xeno_hr_employees_new_list"
                  name="Employee List"
                  parent="menu_xeno_hr_employees"
                  action="action_xeno_employee_list"
                  sequence="0"/>
        <!-- Native Odoo Employees list, kept around (inactive) as a fallback/
             reference rather than deleted: the custom "Employee List" page
             above (xeno_employee_list) is now the one everyone actually uses. -->
        <menuitem id="menu_xeno_hr_employees_list"
                  name="Employee List_Odoo"
                  parent="menu_xeno_hr_employees"
                  action="hr.open_view_employee_list_my"
                  active="0"
                  sequence="1"/>
        <menuitem id="menu_xeno_hr_employees_onboarding"
                  name="Onboarding"
                  parent="menu_xeno_hr_employees"
                  action="action_xeno_hr_onboarding"
                  sequence="2"/>
        <menuitem id="menu_xeno_hr_employees_resignations"
                  name="Offboarding / Resignation"
                  parent="menu_xeno_hr_employees"
                  action="xeno_resignation.action_xeno_resignation"
                  sequence="3"/>
        <menuitem id="menu_xeno_hr_employees_groups"
                  name="Employee Groups"
                  parent="menu_xeno_hr_employees"
                  action="hr.open_view_categ_form"
                  sequence="4"/>
        <menuitem id="menu_xeno_hr_employees_types"
                  name="Employee Types"
                  parent="menu_xeno_hr_employees"
                  action="xeno_attendance.action_xeno_employee_type"
                  sequence="5"/>
        <menuitem id="menu_xeno_hr_employees_jobs"
                  name="Job Positions"
                  parent="menu_xeno_hr_employees"
                  action="hr.action_hr_job"
                  sequence="6"/>

        <!-- Attendance & Time -->
        <menuitem id="menu_xeno_hr_attendance"
                  name="Attendance &amp; Time"
                  parent="menu_xeno_hr_root"
                  sequence="3"/>
        <menuitem id="menu_xeno_hr_attendance_sub"
                  name="Attendance"
                  parent="menu_xeno_hr_attendance"
                  sequence="1"/>
        <menuitem id="menu_xeno_hr_attendance_my"
                  name="My Attendance"
                  parent="menu_xeno_hr_attendance_sub"
                  action="xeno_attendance.action_attendance_my_client"
                  sequence="1"/>
        <menuitem id="menu_xeno_hr_attendance_monthly"
                  name="Attendance"
                  parent="menu_xeno_hr_attendance_sub"
                  action="xeno_attendance.action_attendance_bymonth_client"
                  sequence="2"/>
        <menuitem id="menu_xeno_hr_attendance_team"
                  name="Team Attendance"
                  parent="menu_xeno_hr_attendance_sub"
                  action="xeno_attendance.action_attendance_myteam_client"
                  sequence="3"/>
        <menuitem id="menu_xeno_hr_attendance_work_shifts"
                  name="Work Shifts"
                  parent="menu_xeno_hr_attendance_sub"
                  action="action_xeno_work_schedule_config"
                  sequence="4"/>
        <menuitem id="menu_xeno_hr_attendance_remaps"
                  name="Employee Code Remaps"
                  parent="menu_xeno_hr_attendance"
                  action="xeno_attendance.action_xeno_attendance_code_map"
                  sequence="4"/>

        <!-- Leaves: 1 more shortcut alongside the existing ones -->
        <menuitem id="menu_xeno_hr_leaves_types"
                  name="Leave Types"
                  parent="menu_xeno_hr_leaves"
                  action="action_xeno_leave_type_config"
                  sequence="6"/>
    </data>
</odoo>
