<?xml version="1.0"?>
<data>
                    <div name="button_box" position="inside">
                        <field name="contract_warning" invisible="1"/>
                        <field name="employee_type" invisible="1"/>
                        <button name="action_open_contract_history" class="oe_stat_button" icon="fa-book" type="object" groups="hr_contract.group_hr_contract_manager" attrs="{'invisible' : [('employee_type', 'not in', ['employee', 'student', 'trainee'])]}">
                            <div attrs="{'invisible' : [('first_contract_date', '=', False)]}" class="o_stat_info">
                                <span class="o_stat_text text-success" attrs="{'invisible' : [('contract_warning', '=', True)]}" title="In Contract Since"> In Contract Since</span>
                                <span class="o_stat_value text-success" attrs="{'invisible' : [('contract_warning', '=', True)]}">
                                    <field name="first_contract_date" readonly="1"/>
                                </span>
                                <span class="o_stat_text text-danger" attrs="{'invisible' : [('contract_warning', '=', False)]}" title="In Contract Since">
                                    In Contract Since
                                </span>
                                <span class="o_stat_value text-danger" attrs="{'invisible' : [('contract_warning', '=', False)]}">
                                    <field name="first_contract_date" readonly="1"/>
                                </span>
                            </div>
                            <div attrs="{'invisible' : [('first_contract_date', '!=', False)]}" class="o_stat_info">
                                <span class="o_stat_value text-danger">
                                   <field name="contracts_count"/>
                                </span>
                                <span attrs="{'invisible' : [('contracts_count', '!=', 1)]}" class="o_stat_text text-danger">
                                    Contract
                                </span>
                                <span attrs="{'invisible' : [('contracts_count', '=', 1)]}" class="o_stat_text text-danger">
                                    Contracts
                                </span>
                            </div>
                        </button>
                    </div>
                    <xpath expr="//page[@name='hr_settings']//field[@name='employee_type']" position="after">
                        <field name="first_contract_date" invisible="1"/>
                    </xpath>
                    <xpath expr="//field[@name='bank_account_id']" position="replace">
                        <field name="bank_account_id" context="{'display_partner':True}" attrs="{'invisible' : [('address_home_id', '=', False)]}"/>
                    </xpath>
                    <xpath expr="//field[@name='resource_calendar_id']" position="replace">
                        <field name="calendar_mismatch" invisible="1"/>
                        <label for="resource_calendar_id"/>
                        <div>
                            <field name="resource_calendar_id" required="1" nolabel="1"/>
                            <span attrs="{'invisible': [('calendar_mismatch', '=', False)]}" class="fa fa-exclamation-triangle text-danger o_calendar_warning ms-3" data-tooltip-template="hr_contract.CalendarMismatch" data-tooltip-info="{                                         &quot;text&quot;:&quot;Calendar Mismatch : The employee's calendar does not match this contract's calendar. This could lead to unexpected behaviors.&quot;                                     }">
                            </span>
                        </div>
                    </xpath>
                    <field name="job_id" position="before">
                        <field name="contract_id" groups="hr_contract.group_hr_contract_manager" readonly="1"/>
                    </field>
                </data>
            