<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- Settings > Users is Administrator-only in this deployment (HR's own
         hr.group_hr_user doesn't include base.group_system), so HR has no
         other path to reset an employee's login password today, so this
         button is the one narrow, explicitly-gated write they need,
         living right next to the employee code/login identity fields
         already shown here (xeno_attendance's own "HR System" page). -->
    <record id="view_hr_employee_form_xeno_reset_password" model="ir.ui.view">
        <field name="name">hr.employee.form.xeno.reset.password</field>
        <field name="model">hr.employee</field>
        <field name="inherit_id" ref="xeno_attendance.view_hr_employee_form_xeno_attendance"/>
        <field name="arch" type="xml">
            <xpath expr="//page[@name='xeno_hrsystem']/group" position="after">
                <div groups="hr.group_hr_user" invisible="not user_id">
                    <button name="action_xeno_reset_user_password" type="object"
                            string="Reset Password" class="btn btn-secondary"
                            confirm="Reset this employee's login password back to the default (last 4 digits of their ID Card/Passport number)?"/>
                </div>
            </xpath>
        </field>
    </record>
</odoo>
