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

        <!--
            Process
        -->

        <record id="process_process_membershipprocess0" model="process.process">
            <field eval="&quot;&quot;&quot;Membership Process&quot;&quot;&quot;" name="name"/>
            <field name="model_id" ref="base.model_res_partner"/>
            <field eval="1" name="active"/>
        </record>

        <!--
            Process Node
        -->

        <record id="process_node_membershipproduct0" model="process.node">
            <field name="menu_id" ref="membership.menu_membership_products"/>
            <field name="model_id" ref="product.model_product_product"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Define membership product.&quot;&quot;&quot;" name="note"/>
            <field eval="&quot;&quot;&quot;Membership product&quot;&quot;&quot;" name="name"/>
            <field name="process_id" ref="process_process_membershipprocess0"/>
            <field eval="1" name="flow_start"/>
        </record>

        <record id="process_node_waitingmember0" 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;Draft invoice for membership.&quot;&quot;&quot;" name="note"/>
            <field eval="&quot;&quot;&quot;Waiting member&quot;&quot;&quot;" name="name"/>
            <field name="process_id" ref="process_process_membershipprocess0"/>
            <field eval="0" name="flow_start"/>
        </record>

        <record id="process_node_invoicedmember0" 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;Open invoice.&quot;&quot;&quot;" name="note"/>
            <field eval="&quot;&quot;&quot;Invoiced member&quot;&quot;&quot;" name="name"/>
            <field name="process_id" ref="process_process_membershipprocess0"/>
            <field eval="0" name="flow_start"/>
        </record>

        <record id="process_node_paidmember0" 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;Membership invoice paid.&quot;&quot;&quot;" name="note"/>
            <field eval="&quot;&quot;&quot;Paid member&quot;&quot;&quot;" name="name"/>
            <field name="process_id" ref="process_process_membershipprocess0"/>
            <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_setassociation0" model="process.node">
            <field name="menu_id" ref="membership.menu_members"/>
            <field name="model_id" ref="base.model_res_partner"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Set an associate member of partner.&quot;&quot;&quot;" name="note"/>
            <field eval="&quot;&quot;&quot;Set association&quot;&quot;&quot;" name="name"/>
            <field name="process_id" ref="process_process_membershipprocess0"/>
            <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_associatedmember0" model="process.node">
            <field name="menu_id" ref="membership.menu_members"/>
            <field name="model_id" ref="base.model_res_partner"/>
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
            <field eval="&quot;&quot;&quot;Member is associated.&quot;&quot;&quot;" name="note"/>
            <field eval="&quot;&quot;&quot;Associated member&quot;&quot;&quot;" name="name"/>
            <field name="process_id" ref="process_process_membershipprocess0"/>
            <field eval="&quot;&quot;&quot;object.state=='associated'&quot;&quot;&quot;" name="model_states"/>
            <field eval="0" name="flow_start"/>
        </record>

        <!--
            Process Transition
        -->

        <record id="process_transition_producttomember0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Product to member&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Define product for membership.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_waitingmember0"/>
            <field model="process.node" name="source_node_id" ref="process_node_membershipproduct0"/>
        </record>

        <record id="process_transition_waitingtoinvoice0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Waiting to invoice&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Draft invoice is now open.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_invoicedmember0"/>
            <field model="process.node" name="source_node_id" ref="process_node_waitingmember0"/>
        </record>

        <record id="process_transition_action_create0" model="process.transition.action">
            <field eval="&quot;&quot;&quot;invoice_open&quot;&quot;&quot;" name="action"/>
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
            <field eval="&quot;&quot;&quot;Create&quot;&quot;&quot;" name="name"/>
            <field name="transition_id" ref="process_transition_waitingtoinvoice0"/>
        </record>

        <record id="process_transition_invoicetopaid0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Invoice to paid&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Invoice is be paid.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_paidmember0"/>
            <field model="process.node" name="source_node_id" ref="process_node_invoicedmember0"/>
        </record>

        <record id="process_transition_invoicetoassociate0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;invoice to associate&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Invoiced member may be Associated member.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_associatedmember0"/>
            <field model="process.node" name="source_node_id" ref="process_node_invoicedmember0"/>
        </record>

        <record id="process_transition_associationpartner0" model="process.transition">
            <field eval="[(6,0,[])]" name="transition_ids"/>
            <field eval="&quot;&quot;&quot;Association Partner&quot;&quot;&quot;" name="name"/>
            <field eval="&quot;&quot;&quot;Associated partner.&quot;&quot;&quot;" name="note"/>
            <field model="process.node" name="target_node_id" ref="process_node_associatedmember0"/>
            <field model="process.node" name="source_node_id" ref="process_node_setassociation0"/>
        </record>

    </data>
</openerp>