<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="view_hr_timesheet_invoice_create" model="ir.ui.view">
            <field name="name">hr.timesheet.invoice.create.form</field>
            <field name="model">hr.timesheet.invoice.create</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
            <form string="Create Invoice">
                <notebook colspan="4">
                    <page string="Billing Data">
                       <group col="4" colspan="4">
                           <separator string="Do you want to show details of work in invoice ?" colspan="4"/>
                                <field name="date"/>
                                <field name="time"/>
                                <field name="name"/>
                                <field name="price" groups="base.group_extended"/>
                           </group>
                        <group col="2" colspan="4" groups="base.group_extended">
                            <separator string="Force to use a specific product" colspan="4" />
                            <field name="product"/>
                        </group>
                    </page>
                </notebook>
                <separator colspan="4"/>
                <group col="2" colspan="4">
                    <button special="cancel"  string="Cancel" icon='gtk-cancel'/>
                    <button name="do_create" string="Create Invoices" colspan="1" type="object" icon="terp-gtk-go-back-rtl"/>
                </group>
            </form>
            </field>
        </record>

        <record id="action_hr_timesheet_invoice_create" model="ir.actions.act_window">
            <field name="name">Create Invoice</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">hr.timesheet.invoice.create</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <record model="ir.values" id="hr_timesheet_invoice_create_values">
            <field name="model_id" ref="model_account_analytic_line" />
            <field name="object" eval="1" />
            <field name="name">Create Invoice</field>
            <field name="key2">client_action_multi</field>
            <field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_timesheet_invoice_create'))" />
            <field name="key">action</field>
            <field name="model">account.analytic.line</field>
        </record>

    </data>
</openerp>
