<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <record id="wkf" model="workflow">
            <field name="name">account.voucher.basic</field>
            <field name="osv">account.voucher</field>
            <field name="on_create">True</field>
        </record>
        
        <record id="act_proforma" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="flow_start">True</field>
            <field name="name">proforma</field>
            <field name="action">write({'state':'draft'})</field>
            <field name="kind">function</field>
        </record>
        
        <record id="act_done" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="name">done</field>
            <field name="action">proforma_voucher()</field>
            <field name="kind">function</field>
            <field name="flow_stop">True</field>
        </record>
        
<!--        <record id="act_recheck" model="workflow.activity">-->
<!--            <field name="wkf_id" ref="wkf"/>-->
<!--            <field name="name">recheck</field>-->
<!--            <field name="action">voucher_recheck()</field>-->
<!--            <field name="kind">function</field>-->
<!--        </record>-->
        
        <record id="act_cancel" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="name">cancel</field>
            <field name="flow_stop">True</field>
            <field name="action">cancel_voucher()</field>
            <field name="kind">function</field>
        </record>
        
        <record id="t2" model="workflow.transition">
            <field name="act_from" ref="act_proforma"/>
            <field name="act_to" ref="act_done"/>
            <field name="signal">proforma_voucher</field>
            <field name="condition">True</field>
        </record>
        
<!--        <record id="t3" model="workflow.transition">-->
<!--            <field name="act_from" ref="act_proforma"/>-->
<!--            <field name="act_to" ref="act_recheck"/>-->
<!--            <field name="signal">proforma_voucher</field>-->
<!--        </record>-->
<!--        -->
<!--        <record id="t4" model="workflow.transition">-->
<!--            <field name="act_from" ref="act_recheck"/>-->
<!--            <field name="act_to" ref="act_done"/>-->
<!--            <field name="signal">recheck_voucher</field>-->
<!--        </record>-->
<!--        -->
<!--        <record id="t5" model="workflow.transition">-->
<!--            <field name="act_from" ref="act_recheck"/>-->
<!--            <field name="act_to" ref="act_cancel"/>-->
<!--            <field name="signal">cancel_voucher</field>-->
<!--        </record>-->
        
        <record id="t6" model="workflow.transition">
            <field name="act_from" ref="act_proforma"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_voucher</field>
        </record>
        
        <record id="t7" model="workflow.transition">
            <field name="act_from" ref="act_done"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_voucher</field>
        </record>
        
        <record id="t8" model="workflow.transition">
            <field name="act_from" ref="act_cancel"/>
            <field name="act_to" ref="act_proforma"/>
            <field name="signal">cancel_to_draft</field>
        </record>
    </data>
</openerp>
