<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        
        <record id="view_attendance_form" model="ir.ui.view">
            <field name="name">hr.attendance.form</field>
            <field name="model">hr.attendance</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Employee attendance">
                    <field name="employee_id" select="1"/>
                    <field colspan="4" name="name" select="1"/>
                    <field name="action" select="1"/>
                    <field name="action_desc" select="1"/>
                </form>
            </field>
        </record>
        <record id="view_attendance_tree" model="ir.ui.view">
            <field name="name">hr.attendance.tree</field>
            <field name="model">hr.attendance</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Employee attendances">
                    <field name="name"/>
                    <field name="action"/>
                    <field name="action_desc"/>
                </tree>
            </field>
        </record>
        
        <record id="view_attendance_who" model="ir.ui.view">
            <field name="name">hr.attendance.tree</field>
            <field name="model">hr.attendance</field>
            <field name="type">tree</field>
            <field eval="3" name="priority"/>
            <field name="arch" type="xml">
                <tree string="Employee attendance">
                    <field name="employee_id"/>
                    <field name="name"/>
                    <field name="action"/>
                    <field name="action_desc"/>
                </tree>
            </field>
        </record>
        <record id="open_view_attendance" model="ir.actions.act_window">
            <field name="name">Attendances</field>
            <field name="res_model">hr.attendance</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>
        <menuitem id="menu_hr_attendance" name="Attendances" parent="hr.menu_hr_root"
            groups="group_hr_attendance"/>
        <menuitem action="open_view_attendance" id="menu_open_view_attendance"
            parent="menu_hr_attendance" groups="hr.group_hr_manager"/>
        
        <record id="edit_attendance_reason" model="ir.ui.view">
            <field name="name">hr.action.reason.form</field>
            <field name="model">hr.action.reason</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Define attendance reason">
                    <field colspan="4" name="name" select="1"/>
                    <field name="action_type" select="1"/>
                </form>
            </field>
        </record>
        <record id="view_attendance_reason" model="ir.ui.view">
            <field name="name">hr.action.reason.tree</field>
            <field name="model">hr.action.reason</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Attendance reasons">
                    <field name="name"/>
                    <field name="action_type"/>
                </tree>
            </field>
        </record>
        <record id="open_view_attendance_reason" model="ir.actions.act_window">
            <field name="name">Attendance Reasons</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">hr.action.reason</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="view_attendance_reason"/>
        </record>
        <menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_hr_configuration"/>
        
        <record id="hr_attendance_employee" model="ir.ui.view">
            <field name="name">hr.employee.form1</field>
            <field name="model">hr.employee</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="hr.view_employee_form"/>
            <field name="arch" type="xml">
                <field name="parent_id" position="after">
                    <field name="state"/>
                    <button name="sign_in" states="absent" string="Sign In" type="object"/>
                    <button name="sign_out" states="present" string="Sign Out" type="object"/>
                </field>
            </field>
        </record>
        
    </data>
</openerp>
