<?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="Invoice analytic lines">
			    <group height="280" width="450">
				    <group col="4" colspan="6">
				        <notebook>
				        <page string="Billing Data">
				            <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"/>
				            <separator string="Force to use a specific product" colspan="4"/>
				            <field name="product"/>
				        </page>
				        <page string="Filter on Accounts" groups="base.group_extended">
				            <separator string="Choose accounts you want to invoice" colspan="4"/>
				            <field name="accounts" colspan="4" nolabel="1"/>
				        </page>
				        </notebook>
					</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="gtk-execute"/>
					</group>
				</group>
			</form>
            </field>
        </record>

        <record id="action_hr_timesheet_invoice_create" model="ir.actions.act_window">
            <field name="name">Invoice analytic lines</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">Invoice analytic lines</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>