<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="action_incoming_product_board" model="ir.actions.act_window">
            <field name="name">Incoming Product</field>
            <field name="res_model">stock.move</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('state','in',('confirmed','assigned')),'|','&amp;',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','in')]</field>
            <field name="view_id" ref="stock.view_move_tree_reception_picking"/>
        </record>

        <record id="action_outgoing_product_board" model="ir.actions.act_window">
            <field name="name">Outgoing Product</field>
            <field name="res_model">stock.move</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('state','in',('confirmed','assigned')),'|','&amp;',('picking_id','=',False),('location_dest_id.usage', 'in', ['customer','supplier']),'&amp;',('picking_id','!=',False),('picking_id.type','=','out')]</field>
            <field name="view_id" ref="stock.view_move_tree_reception_picking"/>
        </record>

        <record model="ir.actions.act_window" id="action_stock_incoming_product_delay">
            <field name="name">Incoming Products Delay</field>
            <field name="res_model">report.stock.move</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,tree</field>
            <field name="domain">[('type','=','in'),('day','&lt;=', time.strftime('%Y-%m-%d')),('day','&gt;',(datetime.date.today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))]</field>
            <field name="view_id" ref="stock.view_stock_graph_board"></field>
            <field name="context">{'search_default_month-1':1,'search_default_in':1,'group_by':['day'], 'group_by_no_leaf':1}</field>
         </record>
        <record model="ir.actions.act_window" id="action_stock_outgoing_product_delay">
            <field name="name">Outgoing Products Delay</field>
            <field name="res_model">report.stock.move</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,tree</field>
            <field name="domain">[('type','=','out'),('day','&lt;=', time.strftime('%Y-%m-%d')),('day','&gt;',(datetime.date.today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))]</field>
            <field name="view_id" ref="stock.view_stock_graph_board"></field>
            <field name="context">{'search_default_month-1':1,'search_default_out':1,'group_by':['day'], 'group_by_no_leaf':1}</field>
         </record>
        <record id="board_warehouse_form" model="ir.ui.view">
            <field name="name">board.warehouse.form</field>
            <field name="model">board.board</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Warehouse board">
                    <hpaned position="200">
                        <child1>
                            <action colspan="4" name="%(action_incoming_product_board)d" string="Incoming Product"  width="510"/>
                            <action colspan="4" name="%(action_outgoing_product_board)d" string="Outgoing Product" width="510"/>
                        </child1>

                        <child2>
                            <action colspan="4" name="%(action_stock_incoming_product_delay)d" string="Incoming Products Delay" />
                            <action colspan="4" name="%(action_stock_outgoing_product_delay)d" string="Outgoing Products Delay" />
                        </child2>
                    </hpaned>
                </form>
            </field>
        </record>

        <record id="open_board_warehouse" model="ir.actions.act_window">
            <field name="name">Warehouse Dashboard</field>
            <field name="res_model">board.board</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="board_warehouse_form"/>
        </record>

        <menuitem id="menu_dashboard_stock" name="Dashboard"  sequence="0" parent="stock.next_id_61"/>
        <menuitem action="open_board_warehouse" icon="terp-graph"  groups="group_stock_manager"  id="menu_board_warehouse" parent="menu_dashboard_stock" sequence="1"/>
        <menuitem icon="terp-stock" id="stock.menu_stock_root" name="Warehouse" sequence="5"  groups="group_stock_manager" action="open_board_warehouse"/>

    </data>
</openerp>
