<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_configuration" sequence="30" groups="base.group_no_one"/>
        <record id="hr_hr_employee_view_form2" model="ir.ui.view">
            <field name="name">hr.hr.employee.view.form2</field>
            <field name="model">hr.employee</field>
            <field name="inherit_id" ref="hr.view_employee_form"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//field[@name='parent_id']" position="before">
                        <field name="manager"/>
                    </xpath>
                    <xpath expr="//group[@name='active_group']" position="before">
                        <group>
                            <field name="vehicle"/>
                            <field name="vehicle_distance"/>
                        </group>
                    </xpath>
                    <field name="active" position="before">
                        <field name="medic_exam" string="Medical Exam"/>
                    </field>
                    <field name="birthday" position="before">
                        <field name="children"/>
                    </field>
                    <field name="birthday" position="after">
                        <field name="place_of_birth"/>
                    </field>
                    <field name="bank_account_id" position="replace">
                        <field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
                    </field>
                </data>
            </field>
        </record>

        <record id="hr_contract_view_search" model="ir.ui.view">
            <field name="name">hr.contract.view.search</field>
            <field name="model">hr.contract</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Contract">
                   <group>
                       <field name="name" string="Contracts"/>
                       <separator orientation="vertical"/>
                       <field name="date_start"/>
                       <field name="date_end"/>
                       <separator orientation="vertical"/>
                       <field name="employee_id"/>
                       <field name="working_hours"/>
                   </group>
                   <newline/>
                   <group expand="0" string="Group By...">
                       <filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
                       <separator orientation="vertical"/>
                       <filter string="Working Schedule" icon="terp-go-week" domain="[]" context="{'group_by':'working_hours'}"/>
                       <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
                       <separator orientation="vertical"/>
                       <filter string="Contract Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type_id'}"/>
                   </group>
               </search>
            </field>
        </record>

        <record id="hr_contract_view_form" model="ir.ui.view">
            <field name="name">hr.contract.view.form</field>
            <field name="model">hr.contract</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Contract" version="7.0">
                    <sheet>
                    <div class="oe_title">
                        <h1>
                            <field name="name" placeholder="Contract Reference"/>
                        </h1>
                    </div>
                    <group>
                        <group>
                            <field name="employee_id"/>
                            <field name="job_id"/>
                        </group>
                        <group>
                            <field name="type_id"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Information" name="information">
                            <group>
                                <group name="salary_and_advantages" string="Salary and Advantages">
                                    <field name="wage"/>
                                    <field name="advantages" nolabel="1" placeholder="Advantages..." colspan="2"/>
                                </group>
                                <group name="duration_group" string="Duration">
                                    <label for="trial_date_start" string="Trial Period Duration"/>
                                    <div>
                                        <field name="trial_date_start" class="oe_inline"/> - <field name="trial_date_end" class="oe_inline"/>
                                    </div>
                                    <label for="date_start" string="Duration"/>
                                    <div>
                                        <field name="date_start" class="oe_inline"/> - <field name="date_end" class="oe_inline"/>
                                    </div>
                                    <field name="working_hours"/>
                                </group>
                            </group>
                            <separator string="Notes"/>
                            <field name="notes"/>
                        </page>
                        <page string="Work Permit">
                            <group col="4">
                                <field name="visa_no"/>
                                <field name="permit_no"/>
                                <field name="visa_expire"/>
                            </group>
                        </page>
                    </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="hr_contract_view_tree" model="ir.ui.view">
            <field name="name">hr.contract.view.tree</field>
            <field name="model">hr.contract</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Contracts">
                    <field name="name"/>
                    <field name="employee_id"/>
                    <field name="type_id"/>
                    <field name="job_id"/>
                    <field name="working_hours"/>
                    <field name="date_start"/>
                    <field name="date_end"/>
                    <field name="wage" invisible="1"/>
                </tree>
            </field>
        </record>

        <record id="action_hr_contract" model="ir.actions.act_window">
            <field name="name">Contracts</field>
            <field name="res_model">hr.contract</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[]</field>
            <field name="context">{'search_default_current':1}</field>
            <field name="search_view_id" ref="hr_contract_view_search"/>
        </record>

        <record id="hr_contract_type_view_form" model="ir.ui.view">
            <field name="name">hr.contract.type.view.form</field>
            <field name="model">hr.contract.type</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Contract Type">
                    <field colspan="4" name="name"/>
                </form>
            </field>
        </record>

         <record id="hr_contract_type_view_tree" model="ir.ui.view">
            <field name="name">hr.contract.type.view.tree</field>
            <field name="model">hr.contract.type</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Contract Type">
                    <field colspan="4" name="name"/>
                </tree>
            </field>
        </record>

        <record id="hr_contract_type_view_search" model="ir.ui.view">
            <field name="name">hr.contract.type.view.search</field>
            <field name="model">hr.contract.type</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Contract Type">
                   <group>
                       <field name="name" string="Contract Type"/>
                   </group>
               </search>
            </field>
        </record>

        <record id="action_hr_contract_type" model="ir.actions.act_window">
            <field name="name">Contract Types</field>
            <field name="res_model">hr.contract.type</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="search_view_id" ref="hr_contract_type_view_search"/>
        </record>

        <menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6" groups="base.group_no_one"/>
        <menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4" groups="base.group_hr_manager"/>

        <!-- Contracts Button on Employee Form -->

        <act_window
        context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
        id="act_hr_employee_2_hr_contract"
        name="Contracts"
        res_model="hr.contract"
        src_model="hr.employee"
        groups="base.group_hr_manager"/>

    </data>
</openerp>
<commit_msg>[IMP] hr_contract: improved search views.<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <menuitem id="next_id_56" name="Contract" parent="hr.menu_hr_configuration" sequence="30" groups="base.group_no_one"/>
        <record id="hr_hr_employee_view_form2" model="ir.ui.view">
            <field name="name">hr.hr.employee.view.form2</field>
            <field name="model">hr.employee</field>
            <field name="inherit_id" ref="hr.view_employee_form"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//field[@name='parent_id']" position="before">
                        <field name="manager"/>
                    </xpath>
                    <xpath expr="//group[@name='active_group']" position="before">
                        <group>
                            <field name="vehicle"/>
                            <field name="vehicle_distance"/>
                        </group>
                    </xpath>
                    <field name="active" position="before">
                        <field name="medic_exam" string="Medical Exam"/>
                    </field>
                    <field name="birthday" position="before">
                        <field name="children"/>
                    </field>
                    <field name="birthday" position="after">
                        <field name="place_of_birth"/>
                    </field>
                    <field name="bank_account_id" position="replace">
                        <field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
                    </field>
                </data>
            </field>
        </record>

        <record id="hr_contract_view_search" model="ir.ui.view">
            <field name="name">hr.contract.view.search</field>
            <field name="model">hr.contract</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Contract">
                   <field name="name" string="Contracts"/>
                   <field name="date_start"/>
                   <field name="date_end"/>
                   <field name="employee_id"/>
                   <field name="working_hours"/>
                   <group expand="0" string="Group By...">
                       <filter string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
                       <filter string="Working Schedule" icon="terp-go-week" domain="[]" context="{'group_by':'working_hours'}"/>
                       <filter string="Job" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'job_id'}"/>
                       <filter string="Contract Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type_id'}"/>
                   </group>
               </search>
            </field>
        </record>

        <record id="hr_contract_view_form" model="ir.ui.view">
            <field name="name">hr.contract.view.form</field>
            <field name="model">hr.contract</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Contract" version="7.0">
                    <sheet>
                    <div class="oe_title">
                        <h1>
                            <field name="name" placeholder="Contract Reference"/>
                        </h1>
                    </div>
                    <group>
                        <group>
                            <field name="employee_id"/>
                            <field name="job_id"/>
                        </group>
                        <group>
                            <field name="type_id"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Information" name="information">
                            <group>
                                <group name="salary_and_advantages" string="Salary and Advantages">
                                    <field name="wage"/>
                                    <field name="advantages" nolabel="1" placeholder="Advantages..." colspan="2"/>
                                </group>
                                <group name="duration_group" string="Duration">
                                    <label for="trial_date_start" string="Trial Period Duration"/>
                                    <div>
                                        <field name="trial_date_start" class="oe_inline"/> - <field name="trial_date_end" class="oe_inline"/>
                                    </div>
                                    <label for="date_start" string="Duration"/>
                                    <div>
                                        <field name="date_start" class="oe_inline"/> - <field name="date_end" class="oe_inline"/>
                                    </div>
                                    <field name="working_hours"/>
                                </group>
                            </group>
                            <separator string="Notes"/>
                            <field name="notes"/>
                        </page>
                        <page string="Work Permit">
                            <group col="4">
                                <field name="visa_no"/>
                                <field name="permit_no"/>
                                <field name="visa_expire"/>
                            </group>
                        </page>
                    </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="hr_contract_view_tree" model="ir.ui.view">
            <field name="name">hr.contract.view.tree</field>
            <field name="model">hr.contract</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Contracts">
                    <field name="name"/>
                    <field name="employee_id"/>
                    <field name="type_id"/>
                    <field name="job_id"/>
                    <field name="working_hours"/>
                    <field name="date_start"/>
                    <field name="date_end"/>
                    <field name="wage" invisible="1"/>
                </tree>
            </field>
        </record>

        <record id="action_hr_contract" model="ir.actions.act_window">
            <field name="name">Contracts</field>
            <field name="res_model">hr.contract</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[]</field>
            <field name="context">{'search_default_current':1}</field>
            <field name="search_view_id" ref="hr_contract_view_search"/>
        </record>

        <record id="hr_contract_type_view_form" model="ir.ui.view">
            <field name="name">hr.contract.type.view.form</field>
            <field name="model">hr.contract.type</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Contract Type">
                    <field colspan="4" name="name"/>
                </form>
            </field>
        </record>

         <record id="hr_contract_type_view_tree" model="ir.ui.view">
            <field name="name">hr.contract.type.view.tree</field>
            <field name="model">hr.contract.type</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Contract Type">
                    <field colspan="4" name="name"/>
                </tree>
            </field>
        </record>

        <record id="hr_contract_type_view_search" model="ir.ui.view">
            <field name="name">hr.contract.type.view.search</field>
            <field name="model">hr.contract.type</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Search Contract Type">
                    <field name="name" string="Contract Type"/>
               </search>
            </field>
        </record>

        <record id="action_hr_contract_type" model="ir.actions.act_window">
            <field name="name">Contract Types</field>
            <field name="res_model">hr.contract.type</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="search_view_id" ref="hr_contract_type_view_search"/>
        </record>

        <menuitem action="action_hr_contract_type" id="hr_menu_contract_type" parent="next_id_56" sequence="6" groups="base.group_no_one"/>
        <menuitem action="action_hr_contract" id="hr_menu_contract" parent="hr.menu_hr_main" name="Contracts" sequence="4" groups="base.group_hr_manager"/>

        <!-- Contracts Button on Employee Form -->

        <act_window
        context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
        id="act_hr_employee_2_hr_contract"
        name="Contracts"
        res_model="hr.contract"
        src_model="hr.employee"
        groups="base.group_hr_manager"/>

    </data>
</openerp>

{'fraction_non_alphanumeric': 0.13931985582197148, 'fraction_numerical': 0.002716397638823591, 'mean_word_length': 1.3918040979510244, 'pattern_counts': {'":': 0, '<': 432, '<?xml version=': 2, '>': 432, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5202426', 'n_tokens_mistral': 4987, 'n_tokens_neox': 4688, 'n_words': 819}