<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2015-2020 Akretion (http://www.akretion.com/)
  @author Alexis de Lattre <alexis.delattre@akretion.com>
  License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<odoo>


<record id="product_pricelist_item_view_search" model="ir.ui.view">
    <field name="name">product.pricelist.item.search</field>
    <field name="model">product.pricelist.item</field>
    <field name="inherit_id" ref="product.product_pricelist_item_view_search"/>
    <field name="arch" type="xml">
        <field name="pricelist_id" position="after">
            <field name="product_tmpl_id"/>
            <field name="product_id"/>
            <field name="categ_id"/>
        </field>
        <filter name="groupby_vendor" position="after">
            <filter name="applied_on_groupby" string="Apply On" context="{'group_by': 'applied_on'}"/>
            <filter name="base_on_groupby" string="Based On" context="{'group_by': 'base'}"/>
            <filter name="compute_price_groupby" string="Compute Price" context="{'group_by': 'compute_price'}"/>
            <filter name="currency_groupby" string="Currency" context="{'group_by': 'currency_id'}"/>
        </filter>
    </field>
</record>

<record id="product_pricelist_item_form_view" model="ir.ui.view">
    <field name="name">usability.product.pricelist.item.form</field>
    <field name="model">product.pricelist.item</field>
    <field name="inherit_id" ref="product.product_pricelist_item_form_view"/>
    <field name="arch" type="xml">
        <field name="applied_on" position="before">
            <field name="pricelist_id" position="move"/>
        </field>
        <field name="pricelist_id" position="attributes">
            <attribute name="invisible">context.get('from_product_pricelist_view')</attribute>
        </field>
    </field>
</record>

</odoo>
