<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="wkf" model="workflow">
            <field name="name">hr.payslip.basic</field>
            <field name="osv">hr.payslip</field>
            <field name="on_create">True</field>
        </record>
        
        <record id="act_new" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="flow_start">True</field>
            <field name="name">new</field>
        </record>
        
        <record id="act_draft" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="name">draft</field>
            <field name="action">compute_sheet()</field>
            <field name="split_mode">OR</field>
            <field name="kind">function</field>
        </record>
        
        <record id="act_hr_check" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="name">hr_check</field>
            <field name="action">hr_check_sheet()</field>
            <field name="kind">function</field>
        </record>
        
        <record id="act_confirm" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="name">confirm</field>
            <field name="action">verify_sheet()</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="action">cancel_sheet()</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">process_sheet()</field>
            <field name="kind">function</field>
            <field name="flow_stop">True</field>
        </record>
        
        <record id="t1" model="workflow.transition">
            <field name="act_from" ref="act_new"/>
            <field name="act_to" ref="act_draft"/>
            <field name="signal">compute_sheet</field>
        </record>
        
        <record id="t2" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_hr_check"/>
            <field name="signal">verify_sheet</field>
        </record>
        
        <record id="t3" model="workflow.transition">
            <field name="act_from" ref="act_hr_check"/>
            <field name="act_to" ref="act_confirm"/>
            <field name="signal">final_verify_sheet</field>
        </record>
        
        <record id="t4" model="workflow.transition">
            <field name="act_from" ref="act_confirm"/>
            <field name="act_to" ref="act_done"/>
            <field name="signal">process_sheet</field>
        </record>
        
        <record id="t7" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_sheet</field>
        </record>
        
        <record id="t8" model="workflow.transition">
            <field name="act_from" ref="act_hr_check"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_sheet</field>
        </record>
        
        <record id="t9" model="workflow.transition">
            <field name="act_from" ref="act_confirm"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_sheet</field>
        </record>
        
        <record id="t11" model="workflow.transition">
            <field name="act_from" ref="act_done"/>
            <field name="act_to" ref="act_cancel"/>
            <field name="signal">cancel_sheet</field>
        </record>
        
        <record id="t12" model="workflow.transition">
            <field name="act_from" ref="act_cancel"/>
            <field name="act_to" ref="act_draft"/>
            <field name="signal">set_to_draft</field>
        </record>
    </data>
</openerp>
