<?xml version="1.0" ?>
<openerp>
<data>

    <!-- Workflow definition -->

    <record model="workflow" id="wkf_crossovered_budget">
        <field name="name">wkf.crossovered.budget</field>
        <field name="osv">crossovered.budget</field>
        <field name="on_create">True</field>
    </record>

    <record model="workflow.activity" id="act_draft">
        <field name="wkf_id" ref="wkf_crossovered_budget" />
        <field name="flow_start">True</field>
        <field name="name">draft</field>
        <field name="action">write({'state':'draft'})</field>
        <field name="kind">function</field>
    </record>

    <record model="workflow.activity" id="act_confirm">
        <field name="wkf_id" ref="wkf_crossovered_budget" />
        <field name="name">confirm</field>
        <field name="kind">function</field>
        <field name="action">budget_confirm()</field>
        <field name="split_mode">OR</field>
    </record>

    <record model="workflow.activity" id="act_validate">
        <field name="wkf_id" ref="wkf_crossovered_budget" />
        <field name="name">validate</field>
        <field name="kind">function</field>
        <field name="action">budget_validate()</field>
    </record>

    <record model="workflow.activity" id="act_cancel">
        <field name="wkf_id" ref="wkf_crossovered_budget" />
        <field name="name">cancel</field>
        <field name="kind">function</field>
        <field name="action">budget_cancel()</field>
    </record>

    <record model="workflow.activity" id="act_done">
        <field name="wkf_id" ref="wkf_crossovered_budget" />
        <field name="name">done</field>
        <field name="flow_stop">True</field>
        <field name="kind">stopall</field>
        <field name="action">budget_done()</field>
        <field name="join_mode">XOR</field>

    </record>

    <record model="workflow.transition" id="t1">
        <field name="act_from" ref="act_draft" />
        <field name="act_to" ref="act_confirm" />
        <field name="signal">confirm</field>
    </record>

    <record model="workflow.transition" id="t2">
        <field name="act_from" ref="act_confirm" />
        <field name="act_to" ref="act_validate" />
        <field name="signal">validate</field>
    </record>

    <record model="workflow.transition" id="t3">
        <field name="act_from" ref="act_confirm" />
        <field name="act_to" ref="act_cancel" />
        <field name="signal">cancel</field>
    </record>

    <record model="workflow.transition" id="t4">
        <field name="act_from" ref="act_validate" />
        <field name="act_to" ref="act_cancel" />
        <field name="signal">cancel</field>
    </record>

    <record model="workflow.transition" id="t5">
        <field name="act_from" ref="act_validate" />
        <field name="act_to" ref="act_done" />
        <field name="signal">done</field>
    </record>

    <record model="workflow.transition" id="t6">
        <field name="act_from" ref="act_cancel" />
        <field name="act_to" ref="act_draft" />
        <field name="signal">draft</field>
    </record>

</data>
</openerp>
