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

        <menuitem
            id="menu_purchase_deshboard"
            name="Dashboard"
            parent="base.next_id_73" sequence="0"/>

        <record id="purchase_draft" model="ir.actions.act_window">
            <field name="name">Draft Purchases</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">purchase.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]</field>
            <field name="search_view_id" ref="purchase.purchase_order_tree"/>
        </record>
        <record id="purchase_waiting" model="ir.actions.act_window">
            <field name="name">Quotation Request</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">purchase.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','in',('wait','confirmed'))]</field>
            <field name="search_view_id" ref="purchase.purchase_order_tree"/>
        </record>

        <record id="board_purchase_form" model="ir.ui.view">
            <field name="name">board.purchase.form</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="My Board">
                    <hpaned>
                        <child1>
                            <action colspan="4" height="220" name="%(purchase.action_current_purchases)d" string="Current purchases"  width="510"/>
                            <action colspan="4" height="220" name="%(purchase.action_po_per_month_tree)d" string="Purchase order per month"  width="510"/>
                        </child1>
                        <child2>
                            <action colspan="4" height="220" name="%(purchase.action_purchase_by_supplier)d" string="Purchase by supplier"  />
                            <action colspan="4" height="220" name="%(purchase.action_total_price_by_product_by_state)d" string="Total price by product by state"  />
                            <action colspan="4" height="220" name="%(purchase.action_qty_per_product)d" string="Total Quantity per product"  />
                        </child2>
                    </hpaned>
                </form>
            </field>
        </record>

        <record id="open_board_purchase" model="ir.actions.act_window">
            <field name="name">Purchase Dashboard</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_purchase_form"/>
        </record>
        <menuitem
            action="open_board_purchase"
            icon="terp-graph"
            id="menu_board_purchase"
            parent="menu_purchase_deshboard"
            sequence="4"/>
        <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases" sequence="3" groups="base.group_system,group_purchase_manager,group_purchase_user,base.group_extended" action="open_board_purchase"/>

    </data>
</openerp>
