<?xml version="1.0" encoding="utf-8"?>
<terp>
    <data noupdate="1">
        
        <record id="group_hr_manager" model="res.groups">
            <field name="name">HR Manager</field>
            <field eval="[(4, ref('hr.menu_open_view_employee_tree')), (4, ref('hr.menu_open_view_employee_list')), (4, ref('hr.menu_open_view_employee_new')), (4, ref('hr.menu_view_employee_category_form'))]" name="menu_access"/>
        </record>
        
        <record id="group_hr_employee" model="res.groups">
            <field name="name">Employee</field>
            <field eval="[(4, ref('hr.menu_open_view_employee_tree')), (4, ref('hr.menu_open_view_employee_list')),(4, ref('hr.menu_open_view_employee_new')), (4, ref('hr.menu_view_employee_category_form'))]" name="menu_access"/>
        </record>
        
        <record id="base.user_admin" model="res.users">
            <field eval="[(4, ref('group_hr_employee')),(4, ref('group_hr_manager'))]" name="groups_id"/>
        </record>
        
        <!-- Department security -->
        <record id="access_hr_department" model="ir.model.access">
            <field name="name">HR Department</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.department')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_department_manager" model="ir.model.access">
            <field name="name">HR Department</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.department')]"/>
            <field name="group_id" ref="group_hr_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Timesheet Group security -->
        <record id="access_hr_timesheet" model="ir.model.access">
            <field name="name">HR Timesheet Group</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.timesheet.group')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_timesheet_manager" model="ir.model.access">
            <field name="name">HR Timesheet Group</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.timesheet.group')]"/>
            <field name="group_id" ref="group_hr_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Employee Category security -->
        <record id="access_hr_employee_category" model="ir.model.access">
            <field name="name">HR Employee Category</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.employee.category')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_employee_category_manager" model="ir.model.access">
            <field name="name">HR Employee Category</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.employee.category')]"/>
            <field name="group_id" ref="group_hr_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Employee security -->
        <record id="access_hr_employee" model="ir.model.access">
            <field name="name">HR Employee</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.employee')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_employee_employee" model="ir.model.access">
            <field name="name">HR Employee</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.employee')]"/>
            <field name="group_id" ref="group_hr_employee"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Employee security -->
        <record id="access_hr_timesheet" model="ir.model.access">
            <field name="name">HR Employee Timesheet</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.timesheet')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_timesheet_employee" model="ir.model.access">
            <field name="name">HR Employee Timesheet</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.timesheet')]"/>
            <field name="group_id" ref="group_hr_employee"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Action Reason security -->
        <record id="access_hr_action_reason" model="ir.model.access">
            <field name="name">HR Timesheet Action Reason</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.action.reason')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_action_reason_manager" model="ir.model.access">
            <field name="name">HR Timesheet Action Reason</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.action.reason')]"/>
            <field name="group_id" ref="group_hr_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Timesheet Attendance security -->
        <record id="access_hr_attendance" model="ir.model.access">
            <field name="name">HR Attendance</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.attendance')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_attendance_employee" model="ir.model.access">
            <field name="name">HR Attendance</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.attendance')]"/>
            <field name="group_id" ref="group_hr_employee"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Holiday Status security -->
        <record id="access_hr_holiday_status" model="ir.model.access">
            <field name="name">HR Holiday Status</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays.status')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_holiday_status_manager" model="ir.model.access">
            <field name="name">HR Holiday Status</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays.status')]"/>
            <field name="group_id" ref="group_hr_manager"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
        
        <!-- Holidays security -->
        <record id="access_hr_holiday" model="ir.model.access">
            <field name="name">HR Holidays</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays')]"/>
            <field eval="True" name="perm_read"/>
            <field eval="False" name="perm_write"/>
            <field eval="False" name="perm_create"/>
            <field eval="False" name="perm_unlink"/>
        </record>
        
        <record id="access_hr_holiday_employee" model="ir.model.access">
            <field name="name">HR Holidays</field>
            <field model="ir.model" name="model_id" search="[('model', '=', 'hr.holidays')]"/>
            <field name="group_id" ref="group_hr_employee"/>
            <field eval="True" name="perm_read"/>
            <field eval="True" name="perm_write"/>
            <field eval="True" name="perm_create"/>
            <field eval="True" name="perm_unlink"/>
        </record>
    </data>
</terp>