<?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="res.group" id="group_purchase">
            <field name="name">Purchase</field>
        </record>
        <record model="res.group" id="group_purchase_admin">
            <field name="name">Purchase Administrator</field>
            <field name="parent" ref="group_purchase"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_purchase">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_purchase"/>
        </record>
        <record model="res.user-res.group" id="user_admin_group_purchase_admin">
            <field name="user" ref="res.user_admin"/>
            <field name="group" ref="group_purchase_admin"/>
        </record>

        <record model="ir.ui.icon" id="purchase_icon">
            <field name="name">tryton-purchase</field>
            <field name="path">icons/tryton-purchase.svg</field>
        </record>

        <menuitem
            name="Purchases"
            sequence="70"
            id="menu_purchase"
            icon="tryton-purchase"/>
        <record model="ir.ui.menu-res.group" id="menu_purchase_group_purchase">
            <field name="menu" ref="menu_purchase"/>
            <field name="group" ref="group_purchase"/>
        </record>

        <menuitem
            name="Reporting"
            parent="menu_purchase"
            sequence="100"
            id="menu_reporting"
            active="True"/>

        <record model="ir.action.wizard" id="wizard_shipment_handle_exception">
            <field name="name">Handle Shipment Exception</field>
            <field name="wiz_name">purchase.handle.shipment.exception</field>
            <field name="model">purchase.purchase</field>
        </record>

        <record model="ir.action.wizard" id="wizard_invoice_handle_exception">
            <field name="name">Handle Invoice Exception</field>
            <field name="wiz_name">purchase.handle.invoice.exception</field>
            <field name="model">purchase.purchase</field>
        </record>

        <record model="ir.ui.view" id="purchase_view_form">
            <field name="model">purchase.purchase</field>
            <field name="type">form</field>
            <field name="name">purchase_form</field>
        </record>
        <record model="ir.ui.view" id="purchase_view_tree">
            <field name="model">purchase.purchase</field>
            <field name="type">tree</field>
            <field name="name">purchase_tree</field>
        </record>

        <record model="ir.ui.view" id="handle_shipment_exception_ask_view_form">
            <field name="model">purchase.handle.shipment.exception.ask</field>
            <field name="type">form</field>
            <field name="name">handle_shipment_exception_ask_form</field>
        </record>

        <record model="ir.ui.view" id="handle_invoice_exception_ask_view_form">
            <field name="model">purchase.handle.invoice.exception.ask</field>
            <field name="type">form</field>
            <field name="name">handle_invoice_exception_ask_form</field>
        </record>

        <record model="ir.action.act_window" id="act_purchase_form">
            <field name="name">Purchases</field>
            <field name="res_model">purchase.purchase</field>
            <field name="search_value"></field>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_form_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_view_tree"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_form_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="purchase_view_form"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_service">
            <field name="name">Services</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('line_type', '=', 'service')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_draft">
            <field name="name">Draft</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="['AND',('state', '=', 'draft'),('line_type', '=', 'goods')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_quotation">
            <field name="name">Validation</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="['AND',('state', '=', 'quotation'),('line_type', '=', 'goods')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_confirmed">
            <field name="name">Confirmed</field>
            <field name="sequence" eval="30"/>
            <field name="domain" eval="['AND',('state', '=', 'confirmed'),('line_type', '=', 'goods')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_processing">
            <field name="name">Processing</field>
            <field name="sequence" eval="40"/>
            <field name="domain" eval="['AND',('state', '=', 'processing'),('line_type', '=', 'goods')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_exception">
            <field name="name">Exception</field>
            <field name="sequence" eval="50"/>
            <field name="domain"
                eval="['OR', ('invoice_state', '=', 'exception'), ('shipment_state', '=', 'exception')]"
                pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <record model="ir.action.act_window.domain"
            id="act_purchase_form_domain_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain"></field>
            <field name="act_window" ref="act_purchase_form"/>
        </record>
        <menuitem
            parent="menu_purchase"
            action="act_purchase_form"
            sequence="10"
            id="menu_purchase_form"/>
        
        <record model="ir.action.act_window" id="act_purchase_invoice_relate">
            <field name="name">Purchases</field>
            <field name="res_model">purchase.purchase</field>
            <field name="domain"
                eval="[('invoices', 'in', Eval('active_ids'))]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_purchase_invoice_relate_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_view_tree"/>
            <field name="act_window" ref="act_purchase_invoice_relate"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_purchase_invoice_relate_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="purchase_view_form"/>
            <field name="act_window" ref="act_purchase_invoice_relate"/>
        </record>
        <record model="ir.action.keyword"
            id="act_purchase_invoice_relate_keyword">
            <field name="keyword">form_relate</field>
            <field name="model">account.invoice,-1</field>
            <field name="action" ref="act_purchase_invoice_relate"/>
        </record>

        <record model="ir.action.act_window" id="act_purchase_relate">
            <field name="name">Purchases</field>
            <field name="res_model">purchase.purchase</field>
            <field name="domain"
                eval="[
                If(Eval('active_model') == 'party.party',
                ('party', 'in', Eval('active_ids', [])), ()),
                ]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_relate_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_view_tree"/>
            <field name="act_window" ref="act_purchase_relate"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_relate_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="purchase_view_form"/>
            <field name="act_window" ref="act_purchase_relate"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_purchase_relate_pending">
            <field name="name">Pending</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('state', 'not in', ['done', 'cancelled'])]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_relate"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_purchase_relate_done">
            <field name="name">Done</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('state', '=', 'done')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_relate"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_purchase_relate_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain"></field>
            <field name="act_window" ref="act_purchase_relate"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_relate_keyword_party">
            <field name="keyword">form_relate</field>
            <field name="model">party.party,-1</field>
            <field name="action" ref="act_purchase_relate"/>
        </record>

        <record model="ir.action.act_window" id="act_purchase_relate_simple">
            <field name="name">Purchases</field>
            <field name="res_model">purchase.purchase</field>
            <field
                name="domain"
                eval="[
                If(Eval('active_model') == 'stock.shipment.in',
                ('shipments', 'in', Eval('active_ids', [])), ()),
                If(Eval('active_model') == 'stock.shipment.in.return',
                ('shipment_returns', 'in', Eval('active_ids', [])), ()),
                ]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_relate_simple_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_view_tree"/>
            <field name="act_window" ref="act_purchase_relate_simple"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_relate_simple_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="purchase_view_form"/>
            <field name="act_window" ref="act_purchase_relate_simple"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_relate_simple_keyword_shipment_in">
            <field name="keyword">form_relate</field>
            <field name="model">stock.shipment.in,-1</field>
            <field name="action" ref="act_purchase_relate_simple"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_relate_simple_keyword_shipment_in_return">
            <field name="keyword">form_relate</field>
            <field name="model">stock.shipment.in.return,-1</field>
            <field name="action" ref="act_purchase_relate_simple"/>
        </record>

        <record model="ir.model.access" id="access_purchase">
            <field name="model">purchase.purchase</field>
            <field name="perm_read" eval="False"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_purchase_purchase">
            <field name="model">purchase.purchase</field>
            <field name="group" ref="group_purchase"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>
        <record model="ir.model.access" id="access_purchase_account">
            <field name="model">purchase.purchase</field>
            <field name="group" ref="account.group_account"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.model.access" id="access_purchase_group_stock">
            <field name="model">purchase.purchase</field>
            <field name="group" ref="stock.group_stock"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.model.field.access" id="access_purchase_purchase_invoices_ignored">
            <field name="model">purchase.purchase</field>
            <field name="field">invoices_ignored</field>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
        </record>
        <record model="ir.model.field.access" id="access_purchase_purchase_invoices_ignored_purchase_admin">
            <field name="model">purchase.purchase</field>
            <field name="field">invoices_ignored</field>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
        </record>

        <record model="ir.model.button" id="purchase_cancel_button">
            <field name="model">purchase.purchase</field>
            <field name="name">cancel</field>
            <field name="string">Cancel</field>
        </record>

        <record model="ir.model.button" id="purchase_draft_button">
            <field name="model">purchase.purchase</field>
            <field name="name">draft</field>
            <field name="string">Draft</field>
        </record>

        <record model="ir.model.button" id="purchase_quote_button">
            <field name="model">purchase.purchase</field>
            <field name="name">quote</field>
            <field name="string">Validate</field>
        </record>

        <record model="ir.model.button" id="purchase_confirm_button">
            <field name="model">purchase.purchase</field>
            <field name="name">confirm</field>
            <field name="string">Confirm</field>
        </record>

        <record model="ir.model.button" id="purchase_process_button">
            <field name="model">purchase.purchase</field>
            <field name="name">process</field>
            <field name="string">Process</field>
        </record>
        <record model="ir.model.button-res.group" id="purchase_process_button_group_purchase_admin">
            <field name="button" ref="purchase_process_button"/>
            <field name="group" ref="group_purchase_admin"/>
        </record>

        <record model="ir.model.button" id="purchase_manual_invoice_button">
            <field name="model">purchase.purchase</field>
            <field name="name">manual_invoice</field>
            <field name="string">Create Invoice</field>
        </record>
        <record model="ir.model.button-res.group" id="purchase_manual_button_group_purchase">
            <field name="button" ref="purchase_manual_invoice_button"/>
            <field name="group" ref="group_purchase"/>
        </record>
        <record model="ir.model.button-res.group" id="purchase_manual_button_group_account">
            <field name="button" ref="purchase_manual_invoice_button"/>
            <field name="group" ref="account.group_account"/>
        </record>

        <record model="ir.model.button" id="purchase_modify_header_button">
            <field name="model">purchase.purchase</field>
            <field name="name">modify_header</field>
            <field name="string">Modify Header</field>
        </record>

        <record model="ir.model.button"
                id="purchase_hande_invoice_exception_button">
            <field name="model">purchase.purchase</field>
            <field name="name">handle_invoice_exception</field>
            <field name="string">Handle Invoice Exception</field>
        </record>

        <record model="ir.model.button"
                id="purchase_hande_shipment_exception_button">
            <field name="model">purchase.purchase</field>
            <field name="name">handle_shipment_exception</field>
            <field name="string">Handle Shipment Exception</field>
        </record>

        <record model="ir.sequence.type" id="sequence_type_purchase">
            <field name="name">Purchase</field>
        </record>
        <record model="ir.sequence.type-res.group"
            id="sequence_type_purchase_group_admin">
            <field name="sequence_type" ref="sequence_type_purchase"/>
            <field name="group" ref="res.group_admin"/>
        </record>
        <record model="ir.sequence.type-res.group"
            id="sequence_type_purchase_group_purchase_admin">
            <field name="sequence_type" ref="sequence_type_purchase"/>
            <field name="group" ref="group_purchase_admin"/>
        </record>

        <record model="ir.sequence" id="sequence_purchase">
            <field name="name">Purchase</field>
            <field name="sequence_type" ref="sequence_type_purchase"/>
        </record>

        <record model="ir.action.report" id="report_purchase">
            <field name="name">Purchase</field>
            <field name="model">purchase.purchase</field>
            <field name="report_name">purchase.purchase</field>
            <field name="report">purchase/purchase.fodt</field>
        </record>
        <record model="ir.action.keyword" id="report_purchase_keyword">
            <field name="keyword">form_print</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="report_purchase"/>
        </record>

        <record model="ir.ui.view" id="purchase_line_view_form">
            <field name="model">purchase.line</field>
            <field name="type">form</field>
            <field name="name">purchase_line_form</field>
        </record>

        <record model="ir.ui.view" id="purchase_line_view_tree">
            <field name="model">purchase.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="10"/>
            <field name="name">purchase_line_tree</field>
        </record>

        <record model="ir.ui.view" id="purchase_line_view_tree_sequence">
            <field name="model">purchase.line</field>
            <field name="type">tree</field>
            <field name="priority" eval="20"/>
            <field name="name">purchase_line_tree_sequence</field>
        </record>

        <record model="ir.action.act_window" id="act_purchase_line_relate">
            <field name="name">Purchase Lines</field>
            <field name="res_model">purchase.line</field>
            <field
                name="domain"
                eval="[('type', '=', 'line'),
                If(Eval('active_model') == 'purchase.purchase',
                ('purchase', 'in', Eval('active_ids', [])), ()),
                If(Eval('active_model') == 'product.product',
                ('product', 'in', Eval('active_ids', [])), ()),
                If(Eval('active_model') == 'product.template',
                ('product.template.id', 'in', Eval('active_ids', [])), ()),
                If(Eval('active_model') == 'party.party',
                ('supplier', 'in', Eval('active_ids', [])), ()),
                ]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_line_relate_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_line_view_tree"/>
            <field name="act_window" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.act_window.view" id="act_purchase_line_relate_view2">
            <field name="sequence" eval="20"/>
            <field name="view" ref="purchase_line_view_form"/>
            <field name="act_window" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_purchase_line_relate_pending">
            <field name="name">Pending</field>
            <field name="sequence" eval="10"/>
            <field name="domain" eval="[('purchase_state', 'not in', ['done', 'cancelled'])]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_purchase_line_relate_done">
            <field name="name">Done</field>
            <field name="sequence" eval="20"/>
            <field name="domain" eval="[('purchase_state', '=', 'done')]" pyson="1"/>
            <field name="count" eval="True"/>
            <field name="act_window" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.act_window.domain" id="act_purchase_line_relate_all">
            <field name="name">All</field>
            <field name="sequence" eval="9999"/>
            <field name="domain"></field>
            <field name="act_window" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_line_relate_keyword_purchase">
            <field name="keyword">form_relate</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_line_relate_keyword_product">
            <field name="keyword">form_relate</field>
            <field name="model">product.product,-1</field>
            <field name="action" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_line_relate_keyword_product_template">
            <field name="keyword">form_relate</field>
            <field name="model">product.template,-1</field>
            <field name="action" ref="act_purchase_line_relate"/>
        </record>
        <record model="ir.action.keyword" id="act_purchase_line_relate_keyword_party">
            <field name="keyword">form_relate</field>
            <field name="model">party.party,-1</field>
            <field name="action" ref="act_purchase_line_relate"/>
        </record>

        <record model="ir.model.access" id="access_purchase_line_group_stock">
            <field name="model">purchase.line</field>
            <field name="group" ref="stock.group_stock"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>

        <record model="ir.model.field.access" id="access_purchase_line_moves_ignored">
            <field name="model">purchase.line</field>
            <field name="field">moves_ignored</field>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
        </record>
        <record model="ir.model.field.access" id="access_purchase_line_moves_ignored_purchase_admin">
            <field name="model">purchase.line</field>
            <field name="field">moves_ignored</field>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
        </record>

        <record model="ir.ui.view" id="product_supplier_view_form">
            <field name="model">purchase.product_supplier</field>
            <field name="type">form</field>
            <field name="name">product_supplier_form</field>
        </record>
        <record model="ir.ui.view" id="product_supplier_view_tree">
            <field name="model">purchase.product_supplier</field>
            <field name="type">tree</field>
            <field name="priority" eval="10"/>
            <field name="name">product_supplier_tree</field>
        </record>

        <record model="ir.ui.view" id="product_supplier_view_tree_sequence">
            <field name="model">purchase.product_supplier</field>
            <field name="type">tree</field>
            <field name="priority" eval="20"/>
            <field name="name">product_supplier_tree_sequence</field>
        </record>

        <record model="ir.action.act_window" id="act_product_supplier_form">
            <field name="name">Suppliers</field>
            <field name="res_model">purchase.product_supplier</field>
        </record>
        <record model="ir.action.act_window.view"
            id="act_product_supplier_list_view">
            <field name="sequence" eval="10"/>
            <field name="view" ref="product_supplier_view_tree"/>
            <field name="act_window" ref="act_product_supplier_form"/>
        </record>
        <record model="ir.action.act_window.view"
            id="act_product_supplier_form_view">
            <field name="sequence" eval="20"/>
            <field name="view" ref="product_supplier_view_form"/>
            <field name="act_window" ref="act_product_supplier_form"/>
        </record>

        <menuitem
            parent="product.menu_template"
            sequence="20"
            action="act_product_supplier_form"
            id="menu_product_supplier"/>

        <record model="ir.model.access" id="access_product_supplier">
            <field name="model">purchase.product_supplier</field>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="False"/>
            <field name="perm_create" eval="False"/>
            <field name="perm_delete" eval="False"/>
        </record>
        <record model="ir.model.access" id="access_product_supplier_purchase">
            <field name="model">purchase.product_supplier</field>
            <field name="group" ref="group_purchase"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_create" eval="True"/>
            <field name="perm_delete" eval="True"/>
        </record>

        <record model="ir.rule.group" id="rule_group_product_supplier_companies">
            <field name="name">User in companies</field>
            <field name="model">purchase.product_supplier</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_product_supplier_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_product_supplier_companies"/>
        </record>

        <record model="ir.ui.view" id="product_supplier_price_view_form">
            <field name="model">purchase.product_supplier.price</field>
            <field name="type">form</field>
            <field name="name">product_supplier_price_form</field>
        </record>
        <record model="ir.ui.view" id="product_supplier_price_view_tree">
            <field name="model">purchase.product_supplier.price</field>
            <field name="type">tree</field>
            <field name="name">product_supplier_price_tree</field>
        </record>
        <record model="ir.ui.view" id="product_supplier_price_view_list_sequence">
            <field name="model">purchase.product_supplier.price</field>
            <field name="type">tree</field>
            <field name="name">product_supplier_price_list_sequence</field>
        </record>

        <record model="ir.action.act_window"
            id="act_product_supplier_price_form">
            <field name="name">Prices</field>
            <field name="res_model">purchase.product_supplier.price</field>
            <field name="domain"
                eval="[If(Eval('active_ids', []) == [Eval('active_id')], ('product_supplier', '=', Eval('active_id')), ('product_supplier', 'in', Eval('active_ids')))]"
                pyson="1"/>
        </record>
        <record model="ir.action.keyword"
            id="act_product_supplier_price_form_keyword1">
            <field name="keyword">form_relate</field>
            <field name="model">purchase.product_supplier,-1</field>
            <field name="action" ref="act_product_supplier_price_form"/>
        </record>

        <record model="ir.ui.view" id="return_purchase_start_view_form">
            <field name="model">purchase.return_purchase.start</field>
            <field name="type">form</field>
            <field name="name">return_purchase_start_form</field>
        </record>
        <record model="ir.action.wizard" id="wizard_return_purchase">
            <field name="name">Return Purchase</field>
            <field name="wiz_name">purchase.return_purchase</field>
            <field name="model">purchase.purchase</field>
        </record>
        <record model="ir.action.keyword" id="act_wizard_return_purchase_keyword">
            <field name="keyword">form_action</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="wizard_return_purchase"/>
        </record>

        <record model="ir.action.wizard" id="act_open_supplier">
            <field name="name">Parties associated to Purchases</field>
            <field name="wiz_name">purchase.open_supplier</field>
        </record>
        <menuitem
            name="Associated to Purchases"
            parent="party.menu_party_form"
            action="act_open_supplier"
            sequence="50"
            icon="tryton-list"
            id="menu_supplier"/>

        <record model="ir.action.wizard" id="wizard_modify_header">
            <field name="name">Modify Header</field>
            <field name="wiz_name">purchase.modify_header</field>
            <field name="model">purchase.purchase</field>
        </record>
        <record model="ir.ui.view" id="modify_header_form">
            <field name="model">purchase.purchase</field>
            <field name="inherit" ref="purchase.purchase_view_form"/>
            <field name="name">modify_header_form</field>
            <field name="domain"
                eval="Eval('context', {}).get('modify_header', False)"
                pyson="1"/>
        </record>

        <record model="ir.rule.group" id="rule_group_purchase_companies">
            <field name="name">User in companies</field>
            <field name="model">purchase.purchase</field>
            <field name="global_p" eval="True"/>
        </record>
        <record model="ir.rule" id="rule_purchase_companies">
            <field name="domain"
                eval="[('company', 'in', Eval('companies', []))]"
                pyson="1"/>
            <field name="rule_group" ref="rule_group_purchase_companies"/>
        </record>

        <!-- <record model="ir.action.act_window" id="act_lot_report_from_purchase_min">
            <field name="name">Allocations</field>
            <field name="res_model">lot.report</field>
        </record>
        <record model="ir.action.keyword" id="act_lot_report_keyword_purchase_min">
            <field name="keyword">form_relate</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="act_lot_report_from_purchase_min"/>
        </record>
        <record model="ir.action.act_window.view" id="act_allocation_relate_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_trade.lot_report_view_list"/>
            <field name="act_window" ref="act_lot_report_from_purchase_min"/>
        </record> -->
        <!-- <record model="ir.action.act_window" id="act_allocation_relate">
            <field name="name">Allocations</field>
            <field name="res_model">lot.report</field>
            <field
                name="domain"
                eval="[
                If(Eval('active_model') == 'purchase.purchase',
                ('r_purchase', 'in', Eval('active_ids', [])), ()),
                ]"
                pyson="1"/>
        </record>
        <record model="ir.action.act_window.view" id="act_allocation_relate_view1">
            <field name="sequence" eval="10"/>
            <field name="view" ref="purchase_trade.lot_report_view_list"/>
            <field name="act_window" ref="act_allocation_relate"/>
        </record>
        <record model="ir.action.keyword" id="act_allocation_relate_keyword_purchase">
            <field name="keyword">form_relate</field>
            <field name="model">purchase.purchase,-1</field>
            <field name="action" ref="act_allocation_relate"/>
        </record> -->
    </data>
</tryton>
