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

<!-- Demo Data for Memberships  -->
    <record id="membership_0" model="product.product">
        <field name="membership">True</field>
        <field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
        <field eval="time.strftime('%Y-12-31')" name="membership_date_to"/>
        <field name="name">Gold Membership</field>
        <field name="list_price">180</field>
        <field name="categ_id" ref="product.product_category_1"/>
        <field name="type">service</field>
        <field name="image" type="base64" file="membership/static/img/membership_0-image.jpg"/>
    </record>
    <record id="membership_1" model="product.product">
        <field name="membership">True</field>
        <field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
        <field eval="time.strftime('%Y-12-31')" name="membership_date_to"/>
        <field name="name">Silver Membership</field>
        <field name="categ_id" ref="product.product_category_1"/>
        <field name="list_price">80</field>
        <field name="type">service</field>
        <field name="image" type="base64" file="membership/static/img/membership_1-image.jpg"/>
    </record>
    <record id="membership_2" model="product.product">
        <field name="membership">True</field>
        <field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
        <field eval="time.strftime('%Y-12-31')" name="membership_date_to"/>
        <field name="name">Basic Membership</field>
        <field name="categ_id" ref="product.product_category_1"/>
        <field name="list_price">40</field>
        <field name="type">service</field>
        <field name="image" type="base64" file="membership/static/img/membership_2-image.jpg"/>
    </record>

    <!-- Join Memberships  -->
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_2'), ref('membership_0'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_10'), ref('membership_0'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_12'), ref('membership_0'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_13'), ref('membership_0'), {'amount':180})"/>

    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_18'), ref('membership_1'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_21'), ref('membership_1'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_22'), ref('membership_1'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_23'), ref('membership_1'), {'amount':180})"/>

    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_9'), ref('membership_2'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_11'), ref('membership_2'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_5'), ref('membership_2'), {'amount':180})"/>
    <function model="res.partner" name="create_membership_invoice" eval="(ref('base.res_partner_3'), ref('membership_2'), {'amount':180})"/>

    <!-- Demo data for free member -->
    <record id="base.res_partner_18" model="res.partner">
        <field name="free_member">True</field>
    </record>
    <record id="base.res_partner_7" model="res.partner">
        <field name="free_member">True</field>
    </record>
    <record id="base.res_partner_9" model="res.partner">
        <field name="free_member">True</field>
    </record>
    <record id="base.res_partner_26" model="res.partner">
        <field name="free_member">True</field>
    </record>

    <!-- Demo data for associate member -->
    <record id="base.res_partner_12" model="res.partner">
        <field name="associate_member" ref="base.res_partner_2"/>
    </record>
    <record id="base.res_partner_8" model="res.partner">
        <field name="associate_member" ref="base.res_partner_2"/>
    </record>
    <record id="base.res_partner_3" model="res.partner">
        <field name="associate_member" ref="base.res_partner_2"/>
    </record>
    <record id="base.res_partner_4" model="res.partner">
        <field name="associate_member" ref="base.res_partner_2"/>
    </record>
    <record id="base.res_partner_17" model="res.partner">
        <field name="associate_member" ref="base.res_partner_2"/>
    </record>
    </data>
</openerp>
