<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
    <!-- noupdate="1": without it, every module upgrade rewrites nextcall
         back to the hardcoded past timestamp below, and Odoo's scheduler
         treats an overdue nextcall as "run now": this cron (and its email)
         was firing on every deploy, not just at 09:30 ICT. See
         feedback_odoo_noupdate_retrofit.md for why noupdate="1" alone in
         this file isn't enough once the record already exists in the DB:
         the stored ir.model.data.noupdate column also needs flipping by
         hand (done once via shell alongside this fix).
         nextcall is stored/evaluated in UTC regardless of any user's own
         timezone; Xenoptics is ICT (UTC+7), so 09:30 ICT = 02:30 UTC. -->
    <record id="ir_cron_xeno_send_daily_attendance_email" model="ir.cron">
        <field name="name">HR Dashboard: send daily Employee Attendance Report email (09:30 ICT, working days)</field>
        <field name="model_id" ref="model_xeno_hr_dashboard_email"/>
        <field name="state">code</field>
        <field name="code">model._cron_xeno_send_daily_attendance_email()</field>
        <field name="interval_number">1</field>
        <field name="interval_type">days</field>
        <!-- A nextcall in the past is fine: Odoo's scheduler runs it on
             the next tick, then advances by interval_number/interval_type
             from THIS exact value, so 02:30:00 is what sticks for every
             future occurrence regardless of when the module first installs. -->
        <field name="nextcall" eval="'2026-01-01 02:30:00'"/>
        <field name="active" eval="True"/>
    </record>
</odoo>
