<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">
        <!-- Cron to synchronize transaction -->
        <record id="online_sync_cron" model="ir.cron">
            <field name="name">Account: Journal online sync</field>
            <field name="model_id" ref="account.model_account_journal"/>
            <field name="state">code</field>
            <field name="code">model._cron_fetch_online_transactions()</field>
            <field name="active" eval="True"/>
            <field name="user_id" ref="base.user_root"/>
            <field name="interval_number">12</field>
            <field name="interval_type">hours</field>
        </record>
        <record id="online_sync_cron_waiting_synchronization" model="ir.cron">
            <field name="name">Account: Journal online Waiting Synchronization</field>
            <field name="model_id" ref="account.model_account_journal"/>
            <field name="state">code</field>
            <field name="code">model._cron_fetch_waiting_online_transactions()</field>
            <field name="active" eval="False"/>
            <field name="user_id" ref="base.user_root"/>
            <field name="interval_number">5</field>
            <field name="interval_type">minutes</field>
        </record>
        <!-- Cron to handle sending of reminder email -->
        <record id="online_sync_mail_cron" model="ir.cron">
            <field name="name">Account: Journal online sync reminder</field>
            <field name="model_id" ref="account.model_account_journal"/>
            <field name="state">code</field>
            <field name="code">model._cron_send_reminder_email()</field>
            <field name="active" eval="True"/>
            <field name="user_id" ref="base.user_root"/>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
        </record>
        <!-- Cron to delete unused connections -->
        <record id="online_sync_unused_connection_cron" model="ir.cron">
            <field name="name">Account: Journal online sync cleanup unused connections</field>
            <field name="model_id" ref="odex30_account_online_sync.model_account_online_link"/>
            <field name="state">code</field>
            <field name="code">model._cron_delete_unused_connection()</field>
            <field name="active" eval="True"/>
            <field name="user_id" ref="base.user_root"/>
            <field name="interval_number">1</field>
            <field name="interval_type">days</field>
        </record>
    </data>
</odoo>
