<commit_before><?xml version="1.0" ?>
<openerp>
    <data>

        <record id="view_hr_holidays_filter" model="ir.ui.view">
            <field name="name">hr.holidays.filter</field>
            <field name="model">hr.holidays</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Leave">
                    <group col='8' colspan='4'>
                        <filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated"
                            default="context.get('report', False)"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
                        <filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve"/>
                        <separator orientation="vertical"/>
                        <filter string="This Month" icon="terp-go-month" name="This Month"
                                domain="[('date_from','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"/>
                        <separator orientation="vertical"/>
                        <field name="employee_id">
                            <filter icon="terp-personal"
                                name="my_leaves"
                                domain="[('employee_id.user_id','=', uid)]"
                                help="My Leaves" />
                        </field>
                        <field name="department_id" widget="selection" default="context.get('department_id', False)" >
                            <filter icon="terp-personal+" help="My Department Holidays"
                                domain="[('department_id.manager_id','=',uid)]" />
                        </field>
                        <field name="holiday_status_id" widget="selection"/>
                    </group>
                    <newline/>
                    <group expand="0" string="Extended Filters...">
                        <field name="date_from"/>
                        <field name="date_to"/>
                    </group>
                    <newline />
                    <group expand="0" string="Group By...">
                        <filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
                        <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>
                        <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id','set_visible':True}"/>
                        <separator orientation="vertical"/>
                        <filter name="group_type" string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'holiday_status_id'}"
                            default="context.get('report', False)"/>
                        <separator orientation="vertical"/>
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                    </group>
                </search>
            </field>
        </record>

        <!-- Holidays: Leave Request -->

        <record id="view_holiday_new_calendar" model="ir.ui.view">
            <field name="name">Leave Request</field>
            <field name="model">hr.holidays</field>
            <field name="type">calendar</field>
            <field name="arch" type="xml">
                <calendar string="Leave Request" color="name" date_start="date_from" date_stop="date_to">
                	<field name="holiday_status_id"/>
                </calendar>
            </field>
        </record>

        <record model="ir.ui.view" id="edit_holiday_new">
            <field name="name">Leave Request</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="priority">1</field>
            <field name="arch" type="xml">
                <form string="Leave Request">
                    <group col="8" colspan="4">
                    <field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}" />
                    <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager"/>
                        <group attrs="{'invisible':[('holiday_type','=','employee')]}">
                        <field name="category_id"  attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
                        </group>
                        <group attrs="{'invisible':[('holiday_type','=','category')]}">
                        <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
                        </group>
                    </group>
                    <notebook colspan="4">
                        <page string="General">
                            <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
                            <field name="department_id"/>
                            <field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
                            <field name="date_to" on_change="onchange_date_to(date_from, date_to)" required="1"/>
                            <field name="number_of_days_temp"/>
                            <newline/>
                            <field name="manager_id"/>
                            <field name="manager_id2"/>
                            <separator string="Reasons" colspan="4"/>
                            <field name="notes" nolabel="1" colspan="4"/>
                            <newline/>
                            <field name="state" colspan="2"/>
                            <group colspan="2" col="6">
                                <button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
                                <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
                                <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
                                <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                                <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                                <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
                            </group>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>

        <!-- Holidays: Allocation Request -->
        <record model="ir.ui.view" id="allocation_leave_new">
            <field name="name">Allocation Request</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
            <form string="Allocation Request">
                <group col="8" colspan="4">
                    <field name="name" />
                    <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Type" groups="base.group_extended"/>
                        <group attrs="{'invisible':[('holiday_type','=','category')]}">
                        <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
                        </group>
                        <group attrs="{'invisible':[('holiday_type','=','employee')]}">
                        <field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
                        </group>
                </group>
                <notebook colspan="4">
                    <page string="General">
                        <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
                        <field name="department_id"/>
                        <field name="number_of_days_temp"/>
                        <newline/>
                        <field name="manager_id"/>
                        <field name="manager_id2"/>
                        <separator string="Reasons" colspan="4"/>
                        <field name="notes" nolabel="1" colspan="4" />
                        <newline/>
                        <field name="state" colspan="2"/>
                        <group colspan="2" col="6">
                            <button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
                            <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
                            <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
                            <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                            <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                            <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
                        </group>
                    </page>
                </notebook>
            </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_holiday_allocation_tree">
            <field name="name">hr.holidays.allocation.tree</field>
            <field name="model">hr.holidays</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel') " string="Leaves" >
                    <field name="employee_id"/>
                    <field name="department_id" invisible="1"/>
                    <field name="holiday_status_id"/>
                    <field name="name"/>
                    <field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
                    <field name="manager_id" invisible="1"/>
                    <field name="user_id" invisible="1"/>
                    <!--field name="type"/-->
                    <field name="state"/>
                    <button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
                    <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
                    <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                    <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                    <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
                    <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
                </tree>
            </field>
        </record>

        <!-- Holidays: Leaves Management -->
        <record model="ir.ui.view" id="allocation_company_new">
            <field name="name">Leaves Management</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Leaves Management">
                    <field name="name" />
                    <field name="holiday_status_id" />
                    <field name="type"/>
                    <field name="date_from" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
                    <field name="date_to" on_change="onchange_date_to(date_from, date_to)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
                    <field name="number_of_days_temp"/>
                    <notebook colspan="4">
                        <page string="General">
                            <field name="manager_id"/>
                            <field name="notes" colspan="4"/>
                            <newline/>
                            <field name="state" colspan="2"/>
                            <group colspan="2">
                                <button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel"/>
                                <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
                                <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
                                <button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no"/>
                                <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
                            </group><commit_msg>[MERGE] hr_holidays: correct allocation req list view<commit_after><?xml version="1.0" ?>
<openerp>
    <data>

        <record id="view_hr_holidays_filter" model="ir.ui.view">
            <field name="name">hr.holidays.filter</field>
            <field name="model">hr.holidays</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Leave">
                    <group col='8' colspan='4'>
                        <filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated"
                            default="context.get('report', False)"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
                        <filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve"/>
                        <separator orientation="vertical"/>
                        <filter string="This Month" icon="terp-go-month" name="This Month"
                                domain="[('date_from','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"/>
                        <separator orientation="vertical"/>
                        <field name="employee_id">
                            <filter icon="terp-personal"
                                name="my_leaves"
                                domain="[('employee_id.user_id','=', uid)]"
                                help="My Leaves" />
                        </field>
                        <field name="department_id" widget="selection" default="context.get('department_id', False)" >
                            <filter icon="terp-personal+" help="My Department Holidays"
                                domain="[('department_id.manager_id','=',uid)]" />
                        </field>
                        <field name="holiday_status_id" widget="selection"/>
                    </group>
                    <newline/>
                    <group expand="0" string="Extended Filters...">
                        <field name="date_from"/>
                        <field name="date_to"/>
                    </group>
                    <newline />
                    <group expand="0" string="Group By...">
                        <filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
                        <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>
                        <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id','set_visible':True}"/>
                        <separator orientation="vertical"/>
                        <filter name="group_type" string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'holiday_status_id'}"
                            default="context.get('report', False)"/>
                        <separator orientation="vertical"/>
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                    </group>
                </search>
            </field>
        </record>

        <!-- Holidays: Leave Request -->

        <record id="view_holiday_new_calendar" model="ir.ui.view">
            <field name="name">Leave Request</field>
            <field name="model">hr.holidays</field>
            <field name="type">calendar</field>
            <field name="arch" type="xml">
                <calendar string="Leave Request" color="name" date_start="date_from" date_stop="date_to">
                	<field name="holiday_status_id"/>
                </calendar>
            </field>
        </record>

        <record model="ir.ui.view" id="edit_holiday_new">
            <field name="name">Leave Request</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="priority">1</field>
            <field name="arch" type="xml">
                <form string="Leave Request">
                    <group col="8" colspan="4">
                    <field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}" />
                    <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" groups="base.group_hr_manager"/>
                        <group attrs="{'invisible':[('holiday_type','=','employee')]}">
                        <field name="category_id"  attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
                        </group>
                        <group attrs="{'invisible':[('holiday_type','=','category')]}">
                        <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
                        </group>
                    </group>
                    <notebook colspan="4">
                        <page string="General">
                            <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
                            <field name="department_id"/>
                            <field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
                            <field name="date_to" on_change="onchange_date_to(date_from, date_to)" required="1"/>
                            <field name="number_of_days_temp"/>
                            <newline/>
                            <field name="manager_id"/>
                            <field name="manager_id2"/>
                            <separator string="Reasons" colspan="4"/>
                            <field name="notes" nolabel="1" colspan="4"/>
                            <newline/>
                            <field name="state" colspan="2"/>
                            <group colspan="2" col="6">
                                <button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
                                <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
                                <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
                                <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                                <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                                <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
                            </group>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>

        <!-- Holidays: Allocation Request -->
        <record model="ir.ui.view" id="allocation_leave_new">
            <field name="name">Allocation Request</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
            <form string="Allocation Request">
                <group col="8" colspan="4">
                    <field name="name" />
                    <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Type" groups="base.group_extended"/>
                        <group attrs="{'invisible':[('holiday_type','=','category')]}">
                        <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}"/>
                        </group>
                        <group attrs="{'invisible':[('holiday_type','=','employee')]}">
                        <field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')]}"/>
                        </group>
                </group>
                <notebook colspan="4">
                    <page string="General">
                        <field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}" />
                        <field name="department_id"/>
                        <field name="number_of_days_temp"/>
                        <newline/>
                        <field name="manager_id"/>
                        <field name="manager_id2"/>
                        <separator string="Reasons" colspan="4"/>
                        <field name="notes" nolabel="1" colspan="4" />
                        <newline/>
                        <field name="state" colspan="2"/>
                        <group colspan="2" col="6">
                            <button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_manager"/>
                            <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_manager"/>
                            <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes" groups="base.group_hr_user,base.group_hr_manager"/>
                            <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                            <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                            <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert" groups="base.group_hr_manager"/>
                        </group>
                    </page>
                </notebook>
            </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_holiday_allocation_tree">
            <field name="name">hr.holidays.allocation.tree</field>
            <field name="model">hr.holidays</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1');gray:state in ('cancel') " string="Leaves" >
                    <field name="employee_id"/>
                    <field name="department_id" invisible="1"/>
                    <field name="holiday_status_id"/>
                    <field name="name"/>
                    <field name="number_of_days" string="Number of Days" sum='Remaining Days'/>
                    <field name="manager_id" invisible="1"/>
                    <field name="user_id" invisible="1"/>
                    <!--field name="type"/-->
                    <field name="state"/>
                    <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                    <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_manager"/>
                </tree>
            </field>
        </record>

        <!-- Holidays: Leaves Management -->
        <record model="ir.ui.view" id="allocation_company_new">
            <field name="name">Leaves Management</field>
            <field name="model">hr.holidays</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Leaves Management">
                    <field name="name" />
                    <field name="holiday_status_id" />
                    <field name="type"/>
                    <field name="date_from" on_change="onchange_date_from(date_to, date_from)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
                    <field name="date_to" on_change="onchange_date_to(date_from, date_to)" attrs="{'readonly':[('type','=','add')], 'required':[('type','=','remove')]}"/>
                    <field name="number_of_days_temp"/>
                    <notebook colspan="4">
                        <page string="General">
                            <field name="manager_id"/>
                            <field name="notes" colspan="4"/>
                            <newline/>
                            <field name="state" colspan="2"/>
                            <group colspan="2">
                                <button string="Cancel" name="cancel" states="validate,refuse,validate1" type="workflow" icon="gtk-cancel"/>
                                <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
                                <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
                                <button string="Refuse" name="refuse" states="confirm" type="workflow" icon="gtk-no"/>
                                <button string="Set to Draft" name="set_to_draft" states="cancel" type="object" icon="gtk-convert"/>
                            </group>
{'fraction_non_alphanumeric': 0.16514125108100317, 'fraction_numerical': 0.003567310464110695, 'mean_word_length': 1.8505546425636812, 'pattern_counts': {'":': 0, '<': 417, '<?xml version=': 2, '>': 417, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '658068', 'n_tokens_mistral': 7438, 'n_tokens_neox': 7039, 'n_words': 1175}