<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!-- Top-Level Menu -->
    <menuitem id="menu_fusion_clock_root"
              name="Fusion Clock"
              web_icon="fusion_clock,static/description/icon.png"
              sequence="45"
              groups="group_fusion_clock_user"/>

    <!-- Dashboard -->
    <menuitem id="menu_fusion_clock_dashboard"
              name="Dashboard"
              parent="menu_fusion_clock_root"
              action="action_fusion_clock_dashboard"
              sequence="5"
              groups="group_fusion_clock_manager,group_fusion_clock_team_lead"/>

    <!-- Attendance Sub-Menu -->
    <menuitem id="menu_fusion_clock_attendance"
              name="Attendance"
              parent="menu_fusion_clock_root"
              sequence="10"/>

    <menuitem id="menu_fusion_clock_attendance_list"
              name="All Attendances"
              parent="menu_fusion_clock_attendance"
              action="hr_attendance.hr_attendance_action"
              sequence="10"
              groups="group_fusion_clock_manager,group_fusion_clock_team_lead"/>

    <menuitem id="menu_fusion_clock_corrections"
              name="Correction Requests"
              parent="menu_fusion_clock_attendance"
              action="action_fusion_clock_correction"
              sequence="20"
              groups="group_fusion_clock_manager"/>

    <!-- Activity Logs -->
    <menuitem id="menu_fusion_clock_activity_logs"
              name="Activity Logs"
              parent="menu_fusion_clock_root"
              action="action_fusion_clock_activity_log"
              sequence="15"
              groups="group_fusion_clock_manager,group_fusion_clock_team_lead"/>

    <!-- Locations Sub-Menu -->
    <menuitem id="menu_fusion_clock_locations"
              name="Locations"
              parent="menu_fusion_clock_root"
              action="action_fusion_clock_location"
              sequence="20"
              groups="group_fusion_clock_manager"/>

    <!-- Penalties Sub-Menu -->
    <menuitem id="menu_fusion_clock_penalties"
              name="Penalties"
              parent="menu_fusion_clock_root"
              action="action_fusion_clock_penalty"
              sequence="30"
              groups="group_fusion_clock_manager,group_fusion_clock_team_lead"/>

    <!-- Leave Requests -->
    <menuitem id="menu_fusion_clock_leaves"
              name="Leave Requests"
              parent="menu_fusion_clock_root"
              action="action_fusion_clock_leave_request"
              sequence="35"
              groups="group_fusion_clock_manager"/>

    <!-- Reports Sub-Menu -->
    <menuitem id="menu_fusion_clock_reports_parent"
              name="Reports"
              parent="menu_fusion_clock_root"
              sequence="40"
              groups="group_fusion_clock_manager"/>

    <menuitem id="menu_fusion_clock_reports"
              name="All Reports"
              parent="menu_fusion_clock_reports_parent"
              action="action_fusion_clock_report"
              sequence="10"
              groups="group_fusion_clock_manager"/>

    <menuitem id="menu_fusion_clock_generate_historical"
              name="Generate Historical Reports"
              parent="menu_fusion_clock_reports_parent"
              action="action_server_generate_historical"
              sequence="20"
              groups="group_fusion_clock_manager"/>

    <!-- Employees -->
    <menuitem id="menu_fusion_clock_employees"
              name="Employees"
              parent="menu_fusion_clock_root"
              action="hr.open_view_employee_list_my"
              sequence="50"
              groups="group_fusion_clock_manager,group_fusion_clock_team_lead"/>

    <!-- Configuration Sub-Menu -->
    <menuitem id="menu_fusion_clock_config"
              name="Configuration"
              parent="menu_fusion_clock_root"
              sequence="90"
              groups="group_fusion_clock_manager"/>

    <record id="action_fusion_clock_config_settings" model="ir.actions.act_window">
        <field name="name">Fusion Clock Settings</field>
        <field name="res_model">res.config.settings</field>
        <field name="view_mode">form</field>
        <field name="target">current</field>
        <field name="context">{'module': 'fusion_clock', 'bin_size': False}</field>
    </record>

    <menuitem id="menu_fusion_clock_settings"
              name="Settings"
              parent="menu_fusion_clock_config"
              action="action_fusion_clock_config_settings"
              sequence="10"
              groups="group_fusion_clock_manager"/>

    <menuitem id="menu_fusion_clock_shifts"
              name="Shifts"
              parent="menu_fusion_clock_config"
              action="action_fusion_clock_shift"
              sequence="15"
              groups="group_fusion_clock_manager"/>

    <menuitem id="menu_fusion_clock_locations_config"
              name="Locations"
              parent="menu_fusion_clock_config"
              action="action_fusion_clock_location"
              sequence="20"
              groups="group_fusion_clock_manager"/>

</odoo>
