<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <data noupdate="0">
        <!-- Scheduler for Managing Sponsorship Workflow Every Day -->
        <record id="scheduler_visit_workflow_action" forcecreate='True' model="ir.cron">
            <field name="name">Recurrence Visit Workflow Scheduler</field>
            <field name="user_id" ref="base.user_root"/>
            <field name="interval_number">1</field>
            <field name="nextcall" eval="(DateTime.now() + relativedelta(days=1)).strftime('%Y-%m-%d 00:00:00')"/>
            <!--                    <field name="nextcall" eval="(datetime.now() + timedelta(minutes=7)).strftime('%Y-%m-%d %H:%M:%S')"/>-->
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="doall" eval="False"/>
            <field name="model_id" ref="model_grant_benefit"/>
            <field name="code">model.create_scheduled_visit()</field>
            <field name="state">code</field>
            <field name="priority" eval="5"/>
            <field name="active" eval="True"/>
        </record>
        <!-- Cron for send notification for expiry date attachment for family-->
        <record id="ir_cron_send_notification" model="ir.cron">
            <field name="name">Notification: Expiry date Attachment</field>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="nextcall"
                   eval="(DateTime.today() + relativedelta(hours=0, minutes=0)).strftime('%Y-%m-%d %H:%M:%S')"/>
            <field name="doall" eval="False"/>
            <field name="model_id" ref="model_grant_benefit"/>
            <field name="code">model.send_expiry_date_notification()</field>
            <field name="state">code</field>
        </record>
        <record id="ir_cron_update_data_auto" model="ir.cron">
            <field name="name">Update Data Auto (Daily)</field>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="nextcall"
                   eval="(DateTime.today() + relativedelta(hours=0, minutes=0)).strftime('%Y-%m-%d 00:00:00')"/>
            <field name="doall" eval="False"/>
            <field name="model_id" ref="model_grant_benefit"/>
            <field name="code">model.update_data_automatically()</field>
            <field name="state">code</field>
        </record>
        <record id="ir_cron_auto_exception" model="ir.cron">
            <field name="name">Check Temporarily Exception</field>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="nextcall"
                   eval="(DateTime.today() + relativedelta(hours=0, minutes=0)).strftime('%Y-%m-%d 00:00:00')"/>
            <field name="doall" eval="False"/>
            <field name="model_id" ref="model_grant_benefit"/>
            <field name="code">model.action_auto_exception()</field>
            <field name="state">code</field>
        </record>
        <record id="ir_cron_auto_member_exception" model="ir.cron">
            <field name="name">Check Member Temporarily Exception</field>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="nextcall"
                   eval="(DateTime.today() + relativedelta(hours=0, minutes=0)).strftime('%Y-%m-%d 00:00:00')"/>
            <field name="doall" eval="False"/>
            <field name="model_id" ref="model_family_member"/>
            <field name="code">model.action_auto_exception()</field>
            <field name="state">code</field>
        </record>
        <record id="cron_send_attachment_expiry_emails" model="ir.cron">
            <field name="name">Send Expiring Salary Attachments Notifications</field>
            <field name="model_id" ref="model_salary_line"/>
            <field name="state">code</field>
            <field name="code">model.action_send_attachment_expiry_email()</field>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="active" eval="True"/>
        </record>
        <record id="cron_auto_final_suspend_benefit" model="ir.cron">
            <field name="name">Auto Final Suspend (Benefit)</field>
            <field name="model_id" ref="model_grant_benefit"/>
            <field name="state">code</field>
            <field name="code">model.run_auto_final_suspend()</field>
            <field name="doall" eval="False"/>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="nextcall"
                   eval="(DateTime.today() + relativedelta(hours=0, minutes=0)).strftime('%Y-%m-%d %H:%M:%S')"/>
        </record>
        <record id="cron_auto_final_suspend_member" model="ir.cron">
            <field name="name">Auto Final Suspend (Member)</field>
            <field name="model_id" ref="model_family_member"/>
            <field name="state">code</field>
            <field name="code">model.run_auto_final_suspend()</field>
            <field name="doall" eval="False"/>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
            <field name="numbercall">-1</field>
            <field name="nextcall"
                   eval="(DateTime.today() + relativedelta(hours=0, minutes=0)).strftime('%Y-%m-%d %H:%M:%S')"/>
        </record>
    </data>
</odoo>