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

        <act_window
            context="{'product_id': active_id}"
            id="act_stock_product_location_open"
            name="Stock by Location"
            res_model="stock.location"
            src_model="product.product"
            groups="base.group_extended"/>

        <act_window
            domain="[('tracking_id', '=', active_id)]"
            id="act_stock_tracking_lot_2_stock_report_tracklots"
            name="Stock" res_model="stock.report.tracklots"
            src_model="stock.tracking"/>

           <!-- report , stock inventories date... start -->
        <record model="ir.ui.view" id="report_stock_lines_date_tree">
            <field name="name">report.stock.lines.date.tree</field>
            <field name="model">report.stock.lines.date</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Dates of Inventories">
                    <field name="product_id"/>
                    <field name="date" />
                </tree>
            </field>
        </record>

        <record model="ir.ui.view" id="report_stock_lines_date_search">
            <field name="name">report.stock.lines.date.search</field>
            <field name="model">report.stock.lines.date</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Dates of Inventories">
                    <filter icon="terp-accessories-archiver" name="stockable" string="Stockable"
                        domain="[('product_id.type','=', 'product')]"/>
                    <filter icon="terp-accessories-archiver" string="Consumable"
                        domain="[('product_id.type','=', 'consumable')]"/>
                    <separator orientation="vertical"/>
                    <filter icon="terp-accessories-archiver-minus" string="Non Inv"
                        domain="[('date','=', False)]"/>
                    <separator orientation="vertical"/>
                    <field name="product_id"/>
                    <field name="date"/>
                </search>
            </field>
        </record>

        <record model="ir.ui.view" id="report_stock_lines_date_form">
            <field name="name">report.stock.lines.date.form</field>
            <field name="model">report.stock.lines.date</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Dates of Inventories">
                    <field name="product_id"/>
                    <field name="date"/>
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_stock_line_date">
            <field name="name">Last Product Inventories</field>
            <field name="res_model">report.stock.lines.date</field>
            <field name="view_type">form</field>
             <field name="context">{'search_default_stockable':1}</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem parent="next_id_61" action="action_stock_line_date" id="menu_report_stock_line_date" sequence="2"/>

        <record id="view_location_graph" model="ir.ui.view">
            <field name="name">stock.location.graph</field>
            <field name="model">stock.location</field>
            <field name="type">graph</field>
            <field name="arch" type="xml">
                <graph string="Stock Location">
                    <field name="complete_name"/>
                    <field name="stock_real_value" operator="+"/>
                    <field name="stock_virtual_value" operator="+"/>
                </graph>
            </field>
        </record>

    </data>
</openerp>
