<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

    <record id="cron_ai_coach_tips" model="ir.cron">
        <field name="name">Fusion Clock AI: Weekly Coach Tips</field>
        <field name="model_id" ref="hr.model_hr_employee"/>
        <field name="state">code</field>
        <field name="code">
employees = env['hr.employee'].search([('x_fclk_enable_clock', '=', True)])
employees.action_generate_coach_tip()
        </field>
        <field name="interval_number">1</field>
        <field name="interval_type">weeks</field>
        <field name="active">True</field>
        <field name="priority">90</field>
    </record>

    <record id="cron_ai_cache_cleanup" model="ir.cron">
        <field name="name">Fusion Clock AI: Cache Cleanup</field>
        <field name="model_id" ref="fusion_clock_ai.model_fusion_clock_ai_cache"/>
        <field name="state">code</field>
        <field name="code">model._gc_expired_cache()</field>
        <field name="interval_number">1</field>
        <field name="interval_type">days</field>
        <field name="active">True</field>
        <field name="priority">95</field>
    </record>

    <record id="cron_ai_employee_summaries" model="ir.cron">
        <field name="name">Fusion Clock AI: Daily Employee Summaries</field>
        <field name="model_id" ref="hr.model_hr_employee"/>
        <field name="state">code</field>
        <field name="code">
employees = env['hr.employee'].search([('x_fclk_enable_clock', '=', True)])
employees.action_generate_ai_summary()
        </field>
        <field name="interval_number">1</field>
        <field name="interval_type">days</field>
        <field name="active">False</field>
        <field name="priority">92</field>
    </record>

</odoo>
