<?xml version="1.0"?>
<openerp>
    <data>
        <record id="act_produce_service" model="workflow.activity">
            <field name="wkf_id" ref="procurement.wkf_procurement"/>
            <field name="name">produce_service</field>
            <field name="kind">function</field>
            <field name="action">action_produce_assign_service()</field>
        </record>

        <record id="trans_product_check_produce_service" model="workflow.transition">
            <field name="act_from" ref="procurement.act_confirm_mto"/>
            <field name="act_to" ref="act_produce_service"/>
            <field name="condition">check_produce() and not is_product()</field>
        </record>
        <record id="trans_produce_service_make_done" model="workflow.transition">
            <field name="act_from" ref="act_produce_service"/>
            <field name="act_to" ref="procurement.act_make_done"/>
        </record>
        <record id="trans_produce_service_cancel" model="workflow.transition">
            <field name="act_from" ref="act_produce_service"/>
            <field name="act_to" ref="procurement.act_cancel"/>
            <field name="signal">subflow.cancel</field>
        </record>
        <record id="trans_make_done_done2" model="workflow.transition">
            <field name="act_from" ref="procurement.act_make_done"/>
            <field name="act_to" ref="procurement.act_done"/>
            <field name="condition">action_check_finished()</field>
            <field name="trigger_model">project.task</field>
            <field name="trigger_expr_id">task_id and [task_id.id] or []</field>
        </record>
    </data>
</openerp>

