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

        <!--
            Process
        -->

        <record id="process_process_salesprocess0" model="process.process">
            <field eval="1" name="active"/>
            <field name="model_id" ref="sale.model_sale_order"/>
            <field eval="&quot;&quot;&quot;Sales&quot;&quot;&quot;" name="name"/>
        </record>

        <!--
            Process Node
        -->

        <record id="process_node_order0" 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;Sales Order&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Confirmed sales order to invoice.&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="account.process_process_invoiceprocess0"/>
            <field name="subflow_id" ref="process_process_salesprocess0"/>
            <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_quotation0" 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;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Quotation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Draft state of sales order&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_salesprocess0"/>
            <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_saleorder0" 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;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Sales Order&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Drives procurement and invoicing&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_salesprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='manual'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>

        <record id="process_node_invoice0" model="process.node">
            <field name="menu_id" ref="account.menu_action_invoice_tree1"/>
            <field name="model_id" ref="account.model_account_invoice"/>
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;To be reviewed by the accountant.&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_salesprocess0"/>
            <field name="subflow_id" ref="account.process_process_invoiceprocess0"/>
            <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_confirmquotation0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Confirm Quotation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;The salesman confirms the quotation. The state of the sales order becomes 'In progress' or 'Manual in progress'.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_saleorder0"/>
            <field model="process.node" name="source_node_id" ref="process_node_quotation0"/>
            <field eval="[(6,0,[ref('sale.trans_draft_router')])]" name="transition_ids"/>
        </record>


        <record id="process_transition_invoice0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;The Salesman creates an invoice manually, if the sales order shipping policy is 'Shipping and Manual in Progress'. The invoice is created automatically if the shipping policy is 'Payment before Delivery'.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_invoice0"/>
            <field model="process.node" name="source_node_id" ref="process_node_saleorder0"/>
            <field eval="[(6,0,[ref('sale.trans_wait_invoice_invoice_manual')])]" name="transition_ids"/>
        </record>


        <record id="process_transition_saleinvoice0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;From a sales order&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Depending on the Invoicing control of the sales order, the invoice can be based on delivered or on ordered quantities. Thus, a sales order can generates an invoice or a delivery order as soon as it is confirmed by the salesman.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="account.process_node_draftinvoices0"/>
            <field model="process.node" name="source_node_id" ref="process_node_order0"/>
        </record>

        <!--
            Process Action
        -->

        <record id="process_transition_action_confirm0" model="process.transition.action">
            <field eval="&quot;&quot;&quot;action_wait&quot;&quot;&quot;" name="action"/>
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
            <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
            <field name="transition_id" ref="process_transition_confirmquotation0"/>
        </record>

        <record id="process_transition_action_cancel0" model="process.transition.action">
            <field eval="&quot;&quot;&quot;action_cancel&quot;&quot;&quot;" name="action"/>
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
            <field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
            <field name="transition_id" ref="process_transition_confirmquotation0"/>
        </record>
 
        <record id="process_transition_action_createinvoice0" model="process.transition.action">
            <field eval="&quot;&quot;&quot;action_invoice_create&quot;&quot;&quot;" name="action"/>
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
            <field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
            <field name="transition_id" ref="process_transition_invoice0"/>
        </record>

        <record id="process_transition_action_cancelorder0" model="process.transition.action">
            <field eval="&quot;&quot;&quot;action_cancel&quot;&quot;&quot;" name="action"/>
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
            <field eval="&quot;&quot;&quot;Cancel Order&quot;&quot;&quot;" name="name"/>
            <field name="transition_id" ref="process_transition_invoice0"/>
        </record>

    </data>
</openerp>
