<?xml version="1.0"?>
<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <record model="ir.ui.icon" id="sale_icon">
            <field name="name">tradon-sale</field>
            <field name="path">icons/tradon-sale.svg</field>
        </record>
        <record model="ir.ui.icon" id="invoice_icon">
            <field name="name">tradon-account</field>
            <field name="path">icons/tradon-account.svg</field>
        </record>
        <record model="ir.ui.icon" id="payment_icon">
            <field name="name">tradon-price</field>
            <field name="path">icons/tradon-price.svg</field>
        </record>
        <record model="ir.ui.icon" id="allocation_icon">
            <field name="name">tradon-allocation</field>
            <field name="path">icons/tradon-allocation.svg</field>
        </record>
        <record model="ir.ui.icon" id="purchase_icon">
            <field name="name">tradon-purchase</field>
            <field name="path">icons/tradon-purchase.svg</field>
        </record>
        <record model="ir.ui.icon" id="stock_shipment_in">
            <field name="name">tradon-shipment-in</field>
            <field name="path">icons/tradon-shipment-in.svg</field>
        </record>
        
        <record model="ir.ui.view" id="dashboard_view_form">
            <field name="model">purchase.dashboard</field>
            <field name="type">form</field>
            <field name="name">dashboard_form</field>
        </record>
        <record model="ir.ui.view" id="dashboard_view_list">
            <field name="model">purchase.dashboard</field>
            <field name="type">tree</field>
            <field name="name">dashboard_list</field>
        </record>
        <record model="ir.action.act_window" id="act_dashboard_form">
            <field name="name">Dashboard</field>
            <field name="res_model">purchase.dashboard</field>
            <field name="context_model">dashboard.context</field>
            <field name="context_domain"
                eval="[('user_id', '=', Eval('user', -1))]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_dashboard_view2">
            <field name="sequence" eval="2"/>
            <field name="view" ref="dashboard_view_form"/>
            <field name="act_window" ref="act_dashboard_form"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_dashboard_view">
            <field name="sequence" eval="1"/>
            <field name="view" ref="dashboard_view_list"/>
            <field name="act_window" ref="act_dashboard_form"/>
        </record>

        <record model="ir.action.wizard" id="act_dashboard_loader">
            <field name="name">Load Dashboard</field>
            <field name="wiz_name">purchase.dashboard.loader</field>
        </record>
        
        <record model="ir.action.act_window" id="act_sale_not_confirmed_form">
            <field name="name">Sales not confirmed</field>
            <field name="res_model">sale.sale</field>
            <field
                name="domain"
                eval="[('state', '!=', 'confirmed')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_sale_not_shipped_form">
            <field name="name">Sales not shipped</field>
            <field name="res_model">sale.sale</field>
            <field
                name="domain"
                eval="[('shipment_state', '=', None)]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_invoice_not_validated_form">
            <field name="name">Invoices not validated</field>
            <field name="res_model">account.invoice</field>
            <field
                name="domain"
                eval="[('state', '=', 'draft')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_invoice_not_paid_form">
            <field name="name">Invoices not paid</field>
            <field name="res_model">account.invoice</field>
            <field
                name="domain"
                eval="[('state', '!=', 'paid')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_payment_not_received_form">
            <field name="name">Payments not received</field>
            <field name="res_model">account.payment</field>
            <field
                name="domain"
                eval="[('state', '=', 'draft')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_payment_not_done_form">
            <field name="name">Payments not done</field>
            <field name="res_model">account.payment</field>
            <field
                name="domain"
                eval="[('state', '=', 'draft')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_allocation_not_matched_form">
            <field name="name">Lots not matched</field>
            <field name="res_model">lot.report</field>
        </record>
        <record model="ir.action.act_window" id="act_allocation_matched_form">
            <field name="name">Lots matched</field>
            <field name="res_model">lot.report</field>
            <field name="domain" eval="[('r_lot_matched', '>', 0)]" pyson="1"/>
            <field name="context" eval="{'purchase':None,'sale':None,'shipment':None,'type':'matched','state':'all','wh':'all','group':'by_physic'}" pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_shipment_not_received_form">
            <field name="name">Shipments not received</field>
            <field name="res_model">stock.shipment.in</field>
            <field
                name="domain"
                eval="[('state', '!=', 'received')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_shipment_not_ordered_form">
            <field name="name">Shipments not ordered</field>
            <field name="res_model">stock.shipment.in</field>
            <field
                name="domain"
                eval="[('state', '!=', 'received')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_purchase_not_confirmed_form">
            <field name="name">Purchases not confirmed</field>
            <field name="res_model">purchase.purchase</field>
            <field
                name="domain"
                eval="[('state', '!=', 'confirmed')]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window" id="act_purchase_not_shipped_form">
            <field name="name">Purchases not shipped</field>
            <field name="res_model">purchase.purchase</field>
            <field
                name="domain"
                eval="[('shipment_state', '=', 'none')]"
                pyson="1"/>
        </record>
        <record model="ir.action.wizard" id="act_bot_wizard">
            <field name="name">Bot Wizard</field>
            <field name="wiz_name">bot.wizard</field>
            <field name="model">purchase.dashboard</field>
        </record>
        <menuitem
            action="act_dashboard_loader"
            sequence="1"
            id="menu_purchase_dashboard"/>
    </data>
</tryton>
