<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_xeno_attendance_auto_rule_list" model="ir.ui.view">
            <field name="name">xeno.attendance.auto.rule.list</field>
            <field name="model">xeno.attendance.auto.rule</field>
            <field name="arch" type="xml">
                <list editable="bottom">
                    <field name="employee_id"/>
                    <field name="department_id"/>
                    <field name="note"/>
                    <field name="active" widget="boolean_toggle"/>
                </list>
            </field>
        </record>

        <record id="action_xeno_attendance_auto_rule" model="ir.actions.act_window">
            <field name="name">Auto-fill Rules</field>
            <field name="res_model">xeno.attendance.auto.rule</field>
            <field name="view_mode">list</field>
            <field name="help" type="html">
                <p class="o_view_nocontent_smiling_face">No auto-fill rules configured yet.</p>
                <p>For an employee or department exempt from daily scanning
                (e.g. remote staff, management), a working day with no scan at
                all shows "Present" here instead of blank/absent. A real scan
                always wins over this -- it only fills in the gap when there's
                nothing to show.</p>
            </field>
        </record>
    </data>
    <data noupdate="1">
        <menuitem id="menu_xeno_attendance_auto_rule"
                  name="Auto-fill Rules"
                  parent="hr_attendance.menu_hr_attendance_configuration"
                  action="action_xeno_attendance_auto_rule"
                  groups="hr_attendance.group_hr_attendance_officer"
                  sequence="97"/>
    </data>
</odoo>
