<?xml version="1.0" ?>
<openerp>
    <data>
        
        <!--    
            Process    
        -->
        
        <record id="process_process_invoiceprocess0" model="process.process">
            <field eval="1" name="active"/>
             <field name="model_id" ref="account.model_account_invoice"/>
            <field eval="&quot;&quot;&quot;Customer Invoice Process&quot;&quot;&quot;" name="name"/>
        </record>
        
        <!--    
            Process Node
        -->
        
        <record id="process_node_analytic0" model="process.node">
            <field name="menu_id" ref="account.account_analytic_def_account"/>
            <field name="model_id" ref="account.model_account_analytic_account"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Analytic&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Analytic costs to reinvoice purchases, timesheets, ...&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'close')&quot;&quot;&quot;" name="model_states"/>
            <field eval="1" name="flow_start"/>
        </record>
        
        <record id="process_node_draftinvoices0" model="process.node">
            <field name="menu_id" ref="account.menu_invoice_draft"/>
            <field name="model_id" ref="account.model_account_invoice"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Draft Invoices&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Proposed invoice to be checked, validated and printed&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <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_invoiceinvoice0" model="process.node">
            <field name="menu_id" ref="account.menu_finance_invoice"/>
            <field name="model_id" ref="account.model_account_invoice"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Create Invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Have a number and entries are generated&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <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_accountingentries0" model="process.node">
            <field name="menu_id" ref="account.menu_action_move_line_form"/>
            <field name="model_id" ref="account.model_account_move"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Accounting Entries&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Validated accounting entries.&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <field eval="0" name="flow_start"/>
        </record>
    
        <record id="process_node_bankstatement0" model="process.node">
            <field name="menu_id" ref="account.menu_bank_statement_tree"/>
            <field name="model_id" ref="account.model_account_bank_statement"/>
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Bank Statement&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Statement encoding produces payment entries&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <field name="subflow_id" ref="process_process_statementprocess0"/>
            <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_paymententries0" model="process.node">
            <field name="menu_id" ref="account.menu_action_move_line_form"/>
            <field name="model_id" ref="account.model_account_move_line"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Payment Entries&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Can be draft or validated&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <field eval="&quot;&quot;&quot;object.state in ('draft', 'valid')&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>
    
        <record id="process_node_reconciliation0" model="process.node">
            <field name="menu_id" ref="account.menu_action_move_line_search"/>
            <field name="model_id" ref="account.model_account_move_reconcile"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Reconciliation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Reconciliation of entries from invoice(s) and payment(s)&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='valid'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>
    
        <record id="process_node_paidinvoice0" 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;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Paid invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Paid invoice when reconciled.&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_invoiceprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>
        
        <record id="process_node_accountingstatemententries0" model="process.node">
            <field name="menu_id" ref="account.menu_action_move_line_search"/>
            <field name="model_id" ref="account.model_account_move_line"/>
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Accounting Statement&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Accounting entries at statement's confirmation&quot;&quot;&quot;" name="note"/>
            <field name="subflow_id" ref="account.process_process_invoiceprocess0"/>
            <field name="process_id" ref="process_process_statementprocess0"/>
            <field eval="&quot;&quot;&quot;object.state in ('draft', 'valid')&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>
        

        <!--    
            Process Transition
        -->
        
        <record id="res_roles_invoice0" model="res.roles">
            <field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
        </record>
        
        <record id="account.t5" model="workflow.transition">
            <field name="role_id" ref="res_roles_invoice0"/>
        </record>
        
        <record id="process_transition_confirmstatementfromdraft0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Confirm statement from draft&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Confirm statement with/without reconciliation from draft statement&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
            <field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
        </record>
    
        <record id="process_transition_analyticinvoice0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;analytic Invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;From analytic accounts, Create invoice.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
            <field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
        </record>
        
        <record id="process_transition_customerinvoice0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Customer Invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Number of entries are generated&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
            <field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
            <field eval="[(6,0,[ref('account.t5')])]" name="transition_ids"/>
        </record>
    
        <record id="process_transition_validentries0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Valid Entries&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Valid entries from invoice&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
            <field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
        </record>
    
        <record id="process_transition_entriesreconcile0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Entries Reconcile&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Reconcile Entries.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
            <field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
        </record>
    
        <record id="process_transition_statemententries0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Statement Entries&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;From statement, create entries&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
            <field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
        </record>
    
        <record id="process_transition_paymentreconcile0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Payment Reconcile&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Reconcilate the entries from payment&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
            <field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
        </record>
    
        <record id="process_transition_reconcilepaid0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Reconcile Paid&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Paid invoice when reconciled.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
            <field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
        </record>
        
        <!--    
            Process Action
        -->
        
        <record id="process_transition_action_createentries0" model="process.transition.action">
            <field eval="&quot;&quot;&quot;action_move_create&quot;&quot;&quot;" name="action"/>
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
            <field eval="&quot;&quot;&quot;Create entry&quot;&quot;&quot;" name="name"/>
            <field name="transition_id" ref="process_transition_customerinvoice0"/>
        </record>
    
    </data>
</openerp>
