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

    <!--
        Process Node
    -->

        <record id="process_node_procuretasktask0" model="process.node">
            <field name="menu_id" ref="project.menu_action_view_task"/>
            <field name="model_id" ref="project.model_project_task"/>
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Task&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;For each product, on type service and on order&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="sale.process_process_salesprocess0"/>
            <field name="subflow_id" ref="project.process_process_tasksprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>

        <record id="process_node_saleordertask0" model="process.node">
            <field name="menu_id" ref="sale.menu_sale_order"/>
            <field name="model_id" ref="sale.model_sale_order"/>
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Sale Order Task&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;In case you sell services on sale order&quot;&quot;&quot;" name="note"/>
            <field name="subflow_id" ref="sale.process_process_salesprocess0"/>
            <field name="process_id" ref="project.process_process_tasksprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
            <field eval="1" name="flow_start"/>
        </record>

        <record id="process_node_mrptask0" model="process.node">
            <field name="menu_id" ref="project.menu_action_view_task"/>
            <field name="model_id" ref="project.model_project_task"/>
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Task&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;A task is created to provide the service.&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="procurement.process_process_serviceproductprocess0"/>
            <field name="subflow_id" ref="project.process_process_tasksprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>

    <!--
        Process Transition
    -->

        <record id="process_transition_procuretask0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Procurement Task&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;if product type is 'service' then it creates the task.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_procuretasktask0"/>
            <field model="process.node" name="source_node_id" ref="sale.process_node_saleprocurement0"/>
        </record>

        <record id="process_transition_createtask0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Create Task&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Product type is service, then its creates the task.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="project.process_node_drafttask0"/>
            <field model="process.node" name="source_node_id" ref="process_node_saleordertask0"/>
        </record>

        <record id="process_transition_ordertask0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Order Task&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;If procurement method is Make to order and supply method is produce&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_mrptask0"/>
            <field model="process.node" name="source_node_id" ref="procurement.process_node_serviceonorder0"/>
        </record>

    </data>
</openerp>
