<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="purchase_requisition_workflow" model="workflow">
            <field name="name">Purchase Requisition Basic Workflow</field>
            <field name="osv">purchase.requisition</field>
            <field name="on_create">True</field>
        </record>

        <record id="act_draft" model="workflow.activity">
            <field name="wkf_id" ref="purchase_requisition_workflow"/>
            <field name="flow_start">True</field>
            <field name="name">draft</field>
        </record>
        <record id="act_sent" model="workflow.activity">
            <field name="wkf_id" ref="purchase_requisition_workflow"/>
            <field name="name">sent</field>
            <field name="kind">function</field>
            <field name="action">tender_in_progress()</field>
        </record>
        <record id="act_open" model="workflow.activity">
            <field name="wkf_id" ref="purchase_requisition_workflow"/>
            <field name="name">open</field>
            <field name="kind">function</field>
            <field name="action">tender_open()</field>
        </record>
        <record id="act_cancel" model="workflow.activity">
            <field name="wkf_id" ref="purchase_requisition_workflow"/>
            <field name="name">cancel</field>
            <field name="kind">function</field>
            <field name="flow_stop">True</field>
            <field name="action">tender_cancel()</field>
        </record>
        <record id="act_done" model="workflow.activity">
            <field name="wkf_id" ref="purchase_requisition_workflow"/>
            <field name="name">done</field>
            <field name="action">tender_done()</field>
            <field name="kind">function</field>
            <field name="flow_stop">True</field>
        </record>

        <record id="trans_draft_sent" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_sent"/>
            <field name="signal">sent_suppliers</field>
        </record>
        <record id="trans_sent_open" model="workflow.transition">
            <field name="act_from" ref="act_sent"/>
            <field name="act_to" ref="act_open"/>
            <field name="signal">open_bid</field>
        </record>
         <record id="trans_draft_cancel" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_requisition</field>
        </record>
        <record id="trans_open_done" model="workflow.transition">
            <field name="act_from" ref="act_open"/>
            <field name="act_to" ref="act_done"/>
            <field name="signal">done</field>
        </record>
        <record id="trans_sent_cancel" model="workflow.transition">
            <field name="act_from" ref="act_sent"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_requisition</field>
        </record>
    </data>
</openerp>
