<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <record id="view_warehouse_orderpoint_tree" model="ir.ui.view">
        <field name="name">stock.warehouse.orderpoint.tree</field>
        <field name="model">stock.warehouse.orderpoint</field>
        <field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field name="product_category" />
            </field>
            <field name="product_max_qty" position="after">
                <field name="product_location_qty" />
                <field name="incoming_location_qty" />
                <field name="outgoing_location_qty" />
                <field name="virtual_location_qty" />
            </field>
        </field>
    </record>
    <record id="view_warehouse_orderpoint_form" model="ir.ui.view">
        <field name="name">stock.warehouse.orderpoint.form</field>
        <field name="model">stock.warehouse.orderpoint</field>
        <field name="inherit_id" ref="stock.view_warehouse_orderpoint_form" />
        <field name="arch" type="xml">
            <field name="qty_multiple" position="after">
                <field name="product_location_qty" />
                <field name="incoming_location_qty" />
                <field name="outgoing_location_qty" />
                <field name="virtual_location_qty" />
            </field>
        </field>
    </record>
    <record id="warehouse_orderpoint_search" model="ir.ui.view">
        <field name="name">stock.warehouse.orderpoint.search</field>
        <field name="model">stock.warehouse.orderpoint</field>
        <field name="inherit_id" ref="stock.warehouse_orderpoint_search" />
        <field name="arch" type="xml">
            <field name="product_id" position="after">
                <field
                    name="product_category"
                    filter_domain="[('product_category','child_of',self)]"
                />
            </field>
            <xpath expr="//group[1]" position="inside">
                <filter
                    name="product"
                    string="Product"
                    domain="[]"
                    context="{'group_by':'product_id'}"
                />
                <filter
                    name="product_category"
                    string="Product Category"
                    domain="[]"
                    context="{'group_by':'product_category'}"
                />
            </xpath>
        </field>
    </record>
</odoo>
