<?xml version="1.0" encoding="utf-8"?>
<terp>
    <data>
        <!-- Analytic accounts to close -->
        <record id="view_analytic_account_close_form" model="ir.ui.view">
            <field name="name">report.analytic.account.close.form</field>
            <field name="model">report.analytic.account.close</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Expired analytic accounts">
                    <field name="name" select="1"/>
                    <field name="partner_id" select="1"/>
                    <field name="quantity" select="1"/>
                    <field name="state" select="1"/>
                    <field name="quantity_max"/>
                    <field name="date_deadline" select="1"/>
                    <field name="balance" select="1"/>
                </form>
            </field>
        </record>
        
        
        <record id="view_analytic_account_close_tree" model="ir.ui.view">
            <field name="name">report.analytic.account.close.tree</field>
            <field name="model">report.analytic.account.close</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Expired analytic accounts">
                    <field name="name"/>
                    <field name="partner_id"/>
                    <field name="state"/>
                    <field name="quantity"/>
                    <field name="quantity_max"/>
                    <field name="date_deadline"/>
                    <field name="balance"/>
                </tree>
            </field>
        </record>
        
        <record id="view_analytic_account_graph" model="ir.ui.view">
            <field name="name">report.analytic.account.close.graph</field>
            <field name="model">report.analytic.account.close</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Expired analytic accounts">
                    <field group="True" name="partner_id"/>
                    <field name="quantity" operator="+"/>
                    <field name="quantity_max" operator="+"/>
                </graph>
            </field>
        </record>
        
        <record id="action_analytic_account_tree" model="ir.actions.act_window">
            <field name="name">Expired analytic accounts</field>
            <field name="res_model">report.analytic.account.close</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,graph</field>
            <field name="domain">[('state','=','open')]</field>
        </record>
        <menuitem action="action_analytic_account_tree" id="menu_action_analytic_account_tree" parent="account.next_id_42"/>
        
    </data>
</terp>