<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
    <!-- Test Purchase Exceptions Scheduler-->
    <record model="ir.cron" forcecreate="True" id="ir_cron_test_po_order_except">
        <field name="name">Purchase: Test Draft Orders Exception</field>
        <field name="model_id" ref="purchase.model_purchase_order" />
        <field name="state">code</field>
        <field name="code">model.test_all_draft_orders()</field>
        <field name="user_id" ref="base.user_root" />
        <field name="interval_number">20</field>
        <field name="interval_type">minutes</field>
        <field name="numbercall">-1</field>
        <field name="doall" eval="False" />
        <field name="active" eval="False" />
    </record>
    <record id="po_excep_no_email" model="exception.rule">
        <field name="name">No email on vendor</field>
        <field name="description">No Email for Vendor</field>
        <field name="sequence">50</field>
        <field name="model">purchase.order</field>
        <field name="code">if not self.partner_id.email:
            failed=True</field>
        <field name="active" eval="False" />
    </record>
    <record id="pol_excep_qty_check" model="exception.rule">
        <field name="name">Quantity not positive</field>
        <field name="description">Purchase line quantity must be positive</field>
        <field name="sequence">50</field>
        <field name="model">purchase.order.line</field>
        <field name="code">if self.product_qty &lt; 0:
            failed=True</field>
        <field name="active" eval="False" />
    </record>
</odoo>
