<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_sale_advance_payment_inv" model="ir.ui.view">
            <field name="name">Advance Invoice</field>
            <field name="model">sale.advance.payment.inv</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Advance Invoice">
                    <field name="product_id"/>
                    <newline />
                    <field name="qtty" invisible="1"/>
                    <field name="amount"/>
                    <newline />
                    <separator string="" colspan="4"/>
                    <label string=""  colspan="2" />
                    <button special="cancel" string="Cancel" icon="gtk-cancel"/>
                    <button name="create_invoices" string="Create Invoice" type="object" icon="gtk-go-forward"/>
                </form>
            </field>
        </record>

        <record id="action_view_sale_advance_payment_inv" model="ir.actions.act_window">
            <field name="name">Advance Invoice</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sale.advance.payment.inv</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <record id="view_sale_open_invoice" model="ir.ui.view">
            <field name="name">Open Invoice</field>
            <field name="model">sale.open.invoice</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Invoices">
                    <label string="You invoice has been successfully created!" />
                    <newline />
                    <separator string="" colspan="4"/>
                    <group colspan="4">
                        <button special="cancel" string="Close" icon="gtk-cancel"/>
                        <button name="open_invoice" string="Open Invoice" type="object" icon="gtk-go-forward"/>
                    </group>
                 </form>
            </field>
        </record>

        <record id="action_view_sale_open_invoice" model="ir.actions.act_window">
            <field name="name">Open Invoice</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sale.open.invoice</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>
    </data>
</openerp>
