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

		<record id="wkf_phase" model="workflow">
            <field name="name">project.phase.wkf</field>
            <field name="osv">project.phase</field>
            <field name="on_create">True</field>
        </record>

        <record id="act_draft" model="workflow.activity">
            <field name="wkf_id" ref="wkf_phase"/>
            <field name="flow_start">True</field>
            <field name="name">set_draft</field>
            <field name="kind">function</field>
            <field name="action">set_draft()</field>
        </record>

        <record id="act_start_phase" model="workflow.activity">
            <field name="wkf_id" ref="wkf_phase"/>
            <field name="name">set_open</field>
            <field name="kind">function</field>
            <field name="action">set_open()</field>
        </record>

        <record id="act_cancel_phase" model="workflow.activity">
            <field name="wkf_id" ref="wkf_phase"/>
            <field name="name">set_cancel</field>
            <field name="flow_stop">True</field>
            <field name="kind">function</field>
            <field name="action">set_cancel()</field>
        </record>

		<record id="act_phase_pending" model="workflow.activity">
            <field name="wkf_id" ref="wkf_phase"/>
            <field name="name">set_pending</field>
            <field name="kind">function</field>
            <field name="action">set_pending()</field>
        </record>

        <record id="act_phase_done" model="workflow.activity">
            <field name="wkf_id" ref="wkf_phase"/>
            <field name="name">set_done</field>
            <field name="flow_stop">True</field>
            <field name="kind">function</field>
            <field name="action">set_done()</field>
        </record>

        <record id="t0" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_start_phase"/>
            <field name="signal">set_open</field>
        </record>

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

        <record id="t2" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_phase_done"/>
            <field name="signal">set_done</field>
        </record>

		<record id="t3" model="workflow.transition">
            <field name="act_from" ref="act_start_phase"/>
            <field name="act_to" ref="act_phase_pending"/>
            <field name="signal">set_pending</field>
        </record>

        <record id="t4" model="workflow.transition">
            <field name="act_from" ref="act_phase_pending"/>
            <field name="act_to" ref="act_cancel_phase"/>
            <field name="signal">set_cancel</field>
        </record>

        <record id="t5" model="workflow.transition">
            <field name="act_from" ref="act_phase_pending"/>
            <field name="act_to" ref="act_draft"/>
            <field name="signal">set_draft</field>
        </record>

        <record id="t6" model="workflow.transition">
            <field name="act_from" ref="act_phase_pending"/>
            <field name="act_to" ref="act_start_phase"/>
            <field name="signal">set_open</field>
        </record>

        <record id="t7" model="workflow.transition">
            <field name="act_from" ref="act_start_phase"/>
            <field name="act_to" ref="act_cancel_phase"/>
            <field name="signal">set_cancel</field>
        </record>

        <record id="t8" model="workflow.transition">
            <field name="act_from" ref="act_start_phase"/>
            <field name="act_to" ref="act_phase_done"/>
            <field name="signal">set_done</field>
        </record>

        <record id="t9" model="workflow.transition">
            <field name="act_from" ref="act_start_phase"/>
            <field name="act_to" ref="act_draft"/>
            <field name="signal">set_draft</field>
        </record>

 	</data>
</openerp>
