<?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="account_icon">
            <field name="name">tryton-account</field>
            <field name="path">icons/tryton-account.svg</field>
        </record>
        <record model="ir.ui.icon" id="account_open_icon">
            <field name="name">tryton-account-open</field>
            <field name="path">icons/tryton-account-open.svg</field>
        </record>
        <record model="ir.ui.icon" id="account_close_icon">
            <field name="name">tryton-account-close</field>
            <field name="path">icons/tryton-account-close.svg</field>
        </record>
        <record model="ir.ui.icon" id="account_block_icon">
            <field name="name">tryton-account-block</field>
            <field name="path">icons/tryton-account-block.svg</field>
        </record>

        <record model="ir.ui.view" id="purchase_view_form">
            <field name="model">purchase.purchase</field>
            <field name="inherit" ref="purchase.purchase_view_form"/>
            <field name="name">purchase_form</field>
        </record>

        <record model="ir.ui.view" id="purchase_view_tree">
            <field name="model">purchase.purchase</field>
            <field name="inherit" ref="purchase.purchase_view_tree"/>
            <field name="name">purchase_tree</field>
        </record>

        <record model="ir.ui.view" id="purchase_line_view_form">
            <field name="model">purchase.line</field>
            <field name="inherit" ref="purchase.purchase_line_view_form"/>
            <field name="name">purchase_line_form</field>
        </record>
        <record model="ir.ui.view" id="purchase_line_view_tree_sequence">
            <field name="model">purchase.line</field>
            <field name="inherit" ref="purchase.purchase_line_view_tree_sequence"/>
            <field name="name">purchase_line_tree_sequence</field>
        </record>

        <record model="ir.action.wizard" id="act_bi">
            <field name="name">🧠 Go to BI</field>
            <field name="wiz_name">purchase.bi</field>
            <field name="model">purchase.purchase</field>
        </record>
        <record model="ir.action.keyword" id="act_bi_keyword">
            <field name="keyword">form_action</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="act_bi"/>
        </record>
        <record model="ir.action.url" id="url_bi">
            <field name="name">Go to BI</field>
            <field name="url">http://vps107.geneva.hosting:3000</field>
        </record>

        <record model="ir.action.wizard" id="act_purchase_allocations_wizard">
            <field name="name">Lots Management</field>
            <field name="wiz_name">purchase.allocations.wizard</field>
            <field name="model">purchase.purchase</field>
        </record>
        <!-- Menu Relate dans Purchase -->
        <record model="ir.action.keyword" id="act_purchase_allocations_keyword">
            <field name="keyword">form_relate</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="act_purchase_allocations_wizard"/>
        </record>

        <record model="ir.action.wizard" id="act_open_payment">
            <field name="name">Payments</field>
            <field name="wiz_name">purchase.invoice.payment</field>
            <field name="model">purchase.invoice.report</field>
        </record>
        <record model="ir.action.keyword" id="act_open_payment_keyword1">
            <field name="keyword">tree_open</field>
            <field name="model">purchase.invoice.report,-1</field>
            <field name="action" ref="act_open_payment"/>
        </record>
        <record model="ir.action.keyword" id="act_open_account_keyword2">
            <field name="keyword">form_relate</field>
            <field name="model">purchase.invoice.report,-1</field>
            <field name="action" ref="act_open_payment"/>
        </record>

        <record model="ir.ui.view" id="pur_inv_report_context_view_form">
            <field name="model">purchase.invoice.context</field>
            <field name="type">form</field>
            <field name="name">pur_inv_report_context_form</field>
        </record>
        <record model="ir.ui.view" id="pur_inv_report_view_list">
            <field name="model">purchase.invoice.report</field>
            <field name="type">tree</field>
            <field name="name">pur_inv_report_list</field>
        </record>
        <record model="ir.action.act_window" id="act_pur_inv_report_form">
            <field name="name">Invoicing Report</field>
            <field name="res_model">purchase.invoice.report</field>
            <field name="context_model">purchase.invoice.context</field>
        </record>
        <record model="ir.action.act_window.view" id="act_pur_inv_report_form_view">
            <field name="sequence" eval="70"/>
            <field name="view" ref="pur_inv_report_view_list"/>
            <field name="act_window" ref="act_pur_inv_report_form"/>
        </record>

        <record model="ir.ui.view" id="pnl_bi_view_graph">
            <field name="model">pnl.bi</field>
            <field name="type">form</field>
            <field name="name">pnl_bi_graph</field>
        </record>
        <record model="ir.action.act_window" id="act_pnl_bi">
            <field name="name">Pnl BI</field>
            <field name="res_model">pnl.bi</field>
        </record>
        <record model="ir.action.act_window.view" id="act_pnl_bi_view">
            <field name="sequence" eval="30"/>
            <field name="view" ref="pnl_bi_view_graph"/>
            <field name="act_window" ref="act_pnl_bi"/>
        </record>
        <record model="ir.action.wizard" id="act_pnl_report">
            <field name="name">Pnl report</field>
            <field name="wiz_name">pnl.report</field>
        </record>

        <record model="ir.ui.view" id="mtm_view_form">
            <field name="model">mtm.component</field>
            <field name="type">form</field>
            <field name="name">mtm_form</field>
        </record>
        <record model="ir.ui.view" id="mtm_view_tree">
            <field name="model">mtm.component</field>
            <field name="type">tree</field>
            <field name="name">mtm_tree</field>
        </record>

        <menuitem
            name="Pnl Report"
	        parent="purchase_trade.menu_global_reporting"
	        action="act_pnl_bi"
	        sequence="110"
	        id="menu_pnl_bi"/>
        
        <menuitem
            parent="purchase_trade.menu_global_reporting"
            sequence="100"
            action="act_pur_inv_report_form"
            id="menu_pur_inv_report_form"/>
    </data>
</tryton>