<?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&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="analytic.model_account_analytic_account"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Analytic Costs&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Analytic costs to invoice&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_action_invoice_tree2"/>
            <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;Draft state of an invoice&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_payables"/>
            <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;Invoice's state is Open&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;Manually or automatically entered in the system&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_journal_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&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;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_eaction_account_moves_all"/>
            <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;Payment of invoices&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_eaction_account_moves_all"/>
            <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;Comparison between accounting and payment entries&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;Invoice's state is Done.&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;From analytic accounts&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices.&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;Validation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Draft invoices are validated. &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.pro2_to_open')])]" 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;Validation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the 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;Accounting entries&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Accounting entries are an input of the reconciliation.&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 entries&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;The payment order is sent to the bank.&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;Validation&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Bank statements are entered in the system.&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;System payment&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system.&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>
