<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_sale_order_make_invoice" model="ir.ui.view">
            <field name="name">Create invoices</field>
            <field name="model">sale.make.invoice</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Create invoices">
                    <separator colspan="4" string="Do you really want to create the invoice(s) ?" />
                    <field name="grouped"/>
                    <newline/>
                    <field name="invoice_date"/>
                    <separator string="" colspan="6"/>
                    <button special="cancel" string="Cancel" icon="gtk-cancel"/>
                    <button name="make_invoices" string="Create Invoices" type="object" icon="terp-gtk-go-back-rtl"/>
               </form>
            </field>
        </record>

        <record id="action_sale_order_make_invoice" model="ir.actions.act_window">
            <field name="name">Make Invoices</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sale.make.invoice</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_sale_order_make_invoice"/>
            <field name="target">new</field>
            <field name="multi">True</field>
        </record>
        
        <record model="ir.values" id="sale_order_make_invoice">
            <field name="model_id" ref="sale.model_sale_order" />
            <field name="object" eval="1" />
            <field name="name">Make Invoices</field>
            <field name="key2">client_action_multi</field>
            <field name="value" eval="'ir.actions.act_window,' + str(ref('action_sale_order_make_invoice'))" />
            <field name="key">action</field>
            <field name="model">sale.order</field>
        </record>
    </data>
</openerp>
