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

        <!-- Purchase Order -->

        <record id="po_wizard_rma_1" model="purchase.order">
            <field name="name">POWIZARDCLAIM001</field>
            <field name="date_order">2015-05-08 18:17:05</field>
            <field name="invoice_method">order</field>
            <field name="partner_id" ref="base.res_partner_21"/>
            <field name="currency_id" ref="base.EUR"/>
            <field name="pricelist_id" ref="purchase.list0"/>
            <field name="location_id" ref="stock.stock_location_stock"/>
        </record>

        <!-- Purchase Order Lines-->

        <record id="po_wizard_rma_1_line_1" model="purchase.order.line">
            <field name="name">POWIZARDCLAIM001 Line 1</field>
            <field name="order_id" ref="po_wizard_rma_1"/>
            <field name="product_id" ref="product.product_product_38"/>
            <field name="product_qty">10</field>
            <field name="price_unit">60.0</field>
            <field name="date_planned">2015-05-08</field>
        </record>

        <record id="po_wizard_rma_1_line_2" model="purchase.order.line">
            <field name="name">POWIZARDCLAIM001 Line 2</field>
            <field name="order_id" ref="po_wizard_rma_1"/>
            <field name="product_id" ref="product.product_product_39"/>
            <field name="product_qty">10</field>
            <field name="price_unit">66.0</field>
            <field name="date_planned">2015-05-08</field>
        </record>

        <record id="po_wizard_rma_1_line_3" model="purchase.order.line">
            <field name="name">POWIZARDCLAIM001 Line 3</field>
            <field name="order_id" ref="po_wizard_rma_1"/>
            <field name="product_id" ref="product.product_product_6"/>
            <field name="product_qty">10</field>
            <field name="price_unit">800.0</field>
            <field name="date_planned">2015-05-08</field>
        </record>

        <record id="po_wizard_rma_1_line_4" model="purchase.order.line">
            <field name="name">POWIZARDCLAIM001 Line 4</field>
            <field name="order_id" ref="po_wizard_rma_1"/>
            <field name="product_id" ref="product.product_product_8"/>
            <field name="product_qty">7</field>
            <field name="price_unit">1299.0</field>
            <field name="date_planned">2015-05-08</field>
        </record>

        <!-- Confirm Purchase Order, (Invoice and Picking is created automatically) -->

        <workflow action="purchase_confirm"
            model="purchase.order"
            ref="po_wizard_rma_1"/>

        <workflow action="purchase_approve"
            model="purchase.order"
            ref="po_wizard_rma_1"/>

        <workflow action="invoice_open" model="account.invoice">
            <value eval="obj(ref('po_wizard_rma_1')).invoice_ids[0].id" model="purchase.order"/>
        </workflow>
    </data>
</openerp>
