<?xml version="1.0"?>
<openerp>
    <data>
        <record model="board.note.type" id="note_auction_type1">
            <field name="name">Auction DashBoard</field>
        </record>

        <record model="ir.actions.act_window" id="action_report_latest_objects_tree">
            <field name="res_model">auction.lots</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <record model="ir.actions.act_window" id="action_report_latest_doposit_tree">
            <field name="res_model">auction.deposit</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <record model="ir.ui.view" id="view_report_auction_estimation_adj_category_tree">
             <field name="name">report.auction.estimation.adj.category.tree</field>
            <field name="model">auction.lots</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
            <tree string="Min est/Adj/Max est">
                <field name="create_uid" select="1"/>
                <field name="lot_type" select="1"/>
                <field name="lot_est1" select="1"/>
                <field name="lot_est2" select="1"/>
                <field name="obj_price" select="1"/>
            </tree>
        </field>
    </record>

    <record model="ir.ui.view" id="view_report_auction_lots_estimation_adj_category_graph">
        <field name="name">report.auction.lots.estimation.adj.category.graph</field>
        <field name="model">auction.lots</field>
        <field name="type">graph</field>
        <field name="arch" type="xml">
            <graph string="Min est/Adj/Max est" orientation="vertical" type="bar">
                <field name="lot_type" select="1"/>
                <field name="lot_est1" operator="+"/>
                <field name="obj_price" operator="+"/>
                <field name="lot_est2" operator="+"/>
                <field name="create_uid" group="True"/>
            </graph>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_report_auction_lots_estimation_adj_category_tree">
        <field name="name">Min est/Adj/Max est</field>
        <field name="res_model">auction.lots</field>
        <field name="view_type">form</field>
        <field name="view_mode">graph,tree</field>
    </record>

        <record model="ir.ui.view" id="board_auction_form1">
            <field name="name">board.auction.form</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Auction manager ">
                    <hpaned position="100">
                        <child1>
                            <action
                                string="Latest objects"
                                name="%(auction.action_report_latest_objects_tree)d"
                                height="200"
                                width="510"    />
                            <action string="Latest deposits"
                                name="%(auction.action_report_latest_doposit_tree)d"/>
                            <action string="Objects statistics"
                                name="%(auction.action_report_object_encoded_tree)d"
                                />
                        </child1>

                        <child2>
                            <action
                                string="Total Adjudications"
                                name="%(auction.action_report_auction_adjudication_tree)d"
                                view_mode="graph,tree"
                                colspan="4"/>
                            <action
                                string="Min/Adj/Max"
                                name="%(auction.action_report_auction_lots_estimation_adj_category_tree)d"
                                view_mode="graph,tree" colspan="4" />
                            <action
                                string="Objects by day"
                                name="%(auction.action_report_auction_object_date_tree)d"
                                view_mode="graph,tree" colspan="4" />
                        </child2>
                    </hpaned>
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="open_board_auction">
            <field name="name">Auction board</field>
            <field name="res_model">board.board</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="usage">menu</field>
            <field name="view_id" ref="board_auction_form1"/>
        </record>

        <menuitem name="Dashboard" id="menu_board_auction" parent="auction.auction_report_menu" sequence="0"/>

        <menuitem
            name="Auction DashBoard"
            action="open_board_auction"
            sequence="1"
            id="menu_board_auction_open"  icon="terp-graph" parent="menu_board_auction"/>
        
        <menuitem name="Auction" id="auction.auction_menu_root" icon="terp-purchase" sequence="26" groups="base.group_system" action="open_board_auction"/>

    </data>
</openerp>
