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

        <act_window domain="[('state','&lt;&gt;','close'),('partner_id','&lt;&gt;',False),('to_invoice', '&lt;&gt;', False)]" id="act_my_account" name="Accounts to invoice" res_model="account.analytic.account" src_model="res.users" view_mode="tree,form" view_type="form"/>

        <record id="action_account_analytic_line_to_invoice" model="ir.actions.act_window">
            <field name="name">Costs to invoice</field>
            <field name="res_model">report.account.analytic.line.to.invoice</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,tree</field>
        </record>

        <record id="board_hr_timesheet_invoice_form" model="ir.ui.view">
            <field name="name">board.hr.timesheet.invoice</field>
            <field name="model">board.board</field>
             <field name="type">form</field>
            <field name="inherit_id" ref="account.board_account_form"/>
            <field name="arch" type="xml">
                <xpath expr="/form/hpaned/child1/action[@string='Draft Customer Invoices']" position="before">
                    <action colspan="4" height="160" name="%(hr_timesheet_invoice.action_analytic_account_tree)d" string="Analytic accounts to close" width="510"/>
                    <action colspan="4" height="160" name="%(act_my_account)d" string="Accounts to invoice" width="510"/>
                </xpath>
            </field>
        </record>

        <!-- Need to merge in above view -->
        <record id="board_hr_timesheet_invoice_report_form1" model="ir.ui.view">
            <field name="name">board.hr.timesheet.invoice</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="account.board_account_form"/>
            <field name="arch" type="xml">
                <xpath expr="/form/hpaned/child2/action[@string='Aged income']" position="after">
                    <action colspan="4" height="220" name="%(action_account_analytic_line_to_invoice)d" string="Costs to invoice"/>
                </xpath>
            </field>
        </record>

        <record id="view_timesheet_uninvoiced_line_tree" model="ir.ui.view">
            <field name="name">timesheet.uninvoiced.line.tree</field>
            <field name="model">report.timesheet.line</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Uninvoiced line with billing rate">
                    <field name="date"/>
                    <field name="account_id"/>
                    <field name="user_id" />
                    <field name="name"/>
                    <field name="cost"/>
                </tree>
            </field>
        </record>

        <record id="action_timesheet_uninvoiced_line" model="ir.actions.act_window">
            <field name="name">Uninvoice lines with billing rate</field>
            <field name="res_model">report.timesheet.line</field>
            <field name="view_type">form</field>
            <field name="view_mode">form,tree</field>
            <field name="domain">[('invoice_id','=',False)]</field>
            <field name="view_id" ref="view_timesheet_uninvoiced_line_tree"/>
        </record>

        <record id="board_hr_timesheet_uninvoiced_form" model="ir.ui.view">
            <field name="name">board.hr.timesheet.uninvoiced.form</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="hr.board_hr_manager_form"/>
            <field name="arch" type="xml">
                <xpath expr="/form/hpaned/child1" position="inside">
                    <action colspan="4" height="220" name="%(action_timesheet_uninvoiced_line)d" string="Uninvoice lines with billing rate" />
                </xpath>
            </field>
        </record>

    </data>
</openerp>
