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

		<record id="view_hr_timesheet_invoice_create_final" model="ir.ui.view">
            <field name="name">hr.timesheet.invoice.create.final.form</field>
            <field name="model">hr.timesheet.invoice.create.final</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
			<form string="Final invoice for analytic account">
			    <group col="4" colspan="6">
			        <separator string="Do you want details for each line of the invoices ?" colspan="4"/>
			        <field name="date"/>
			        <field name="time"/>
			        <field name="name"/>
			        <field name="price"/>
			        <separator string="Invoice Balance amount" colspan="4"/>
			        <field name="balance_product" required="1"/>
				</group>
				<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_final" model="ir.actions.act_window">
            <field name="name">Final Invoice</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">hr.timesheet.invoice.create.final</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_final_values">
            <field name="model_id" ref="model_account_analytic_account" />
            <field name="object" eval="1" />
            <field name="name">Final Invoice</field>
            <field name="key2">client_action_multi</field>
            <field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_timesheet_invoice_create_final'))" />
            <field name="key">action</field>
            <field name="model">account.analytic.account</field>
        </record>

	</data>
</openerp>
