<?xml version="1.0" ?>
<openerp>
    <data>
        
        <!--    
            Process    
        -->
        
        <record id="process_process_supplierinvoiceprocess0" model="process.process">
            <field eval="1" name="active"/>
            <field name="model_id" ref="account.model_account_invoice"/>
            <field eval="&quot;&quot;&quot;Supplier Invoice Process&quot;&quot;&quot;" name="name"/>
        </record>
        
        <!--    
            Process Node
        -->
        
        <record id="process_node_analyticcost0" 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_supplierinvoiceprocess0"/>
            <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_supplierdraftinvoices0" 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;Pre-generated invoice from control&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
            <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_supplierinvoiceinvoice0" 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;Control 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_supplierinvoiceprocess0"/>
            <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_supplierbankstatement0" 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_supplierinvoiceprocess0"/>
            <field name="subflow_id" ref="process_process_statementprocess0"/>
            <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_supplieraccountingentries0" 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_supplierinvoiceprocess0"/>
            <field eval="0" name="flow_start"/>
        </record>
        
        <record id="process_node_supplierpaymentorder0" 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;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Payment Order&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Select invoices you want to pay and manages advances&quot;&quot;&quot;" name="note"/>
            <field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
            <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_supplierreconciliation0" 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_supplierinvoiceprocess0"/>
            <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_supplierpaidinvoice0" 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_supplierinvoiceprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>
        
        <!--    
            Process Transition
        -->
        
		<record id="process_transition_supplieranalyticcost0" 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_supplierdraftinvoices0"/>
            <field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
        </record>
        
        <record id="process_transition_suppliercustomerinvoice0" 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_supplierinvoiceinvoice0"/>
            <field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
            <field eval="[(6,0,[ref('account.t5')])]" name="transition_ids"/>
        </record>
    
        <record id="process_transition_suppliervalidentries0" 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_supplieraccountingentries0"/>
            <field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
        </record>
    
        <record id="process_transition_supplierentriesreconcile0" 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_supplierreconciliation0"/>
            <field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
        </record>
        
        <record id="process_transition_paymentorderbank0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Payment Reconcilation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Reconcilation of entries from payment order.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
            <field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
        </record>
        
        <record id="process_transition_paymentorderreconcilation0" model="process.transition">
            <field eval="[(6,0,[])]" name="role_ids"/>
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Payment Reconcilation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Reconcilation of entries from payment order.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
            <field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
        </record>
        
        <record id="process_transition_supplierreconcilepaid0" 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_supplierpaidinvoice0"/>
            <field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
        </record>
        
   </data>
</openerp>
