<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
    <record
        forcecreate="True"
        id="expired_purchase_blanket_orders_cron"
        model="ir.cron"
    >
        <field name="name">Expire Blanket Orders</field>
        <field name="interval_number">1</field>
        <field name="interval_type">days</field>
        <field
            name="nextcall"
            eval="(DateTime.now() + relativedelta(hour=00, minute=1, second=0)).strftime('%Y-%m-%d %H:%M:%S')"
        />
        <field name="numbercall">-1</field>
        <field name="doall" eval="False" />
        <field name="model_id" ref="model_purchase_blanket_order" />
        <field name="state">code</field>
        <field name="code">model.expire_orders()</field>
    </record>

    <record id="warnings_purchase_blanket_orders_cron" model="ir.cron">
        <field name="name">Warnings Blanket Orders</field>
        <field name="interval_number">1</field>
        <field name="interval_type">days</field>
        <field
            name="nextcall"
            eval="(DateTime.now() + relativedelta(hour=00, minute=1, second=0)).strftime('%Y-%m-%d %H:%M:%S')"
        />
        <field name="numbercall">-1</field>
        <field name="doall" eval="False" />
        <field name="model_id" ref="model_purchase_blanket_order" />
        <field name="state">code</field>
        <field name="code">model.compute_warnings()</field>
    </record>
</odoo>
