<odoo>

    <record id="stock_request_order_search" model="ir.ui.view">
        <field name="name">stock.request.order.search</field>
        <field name="model">stock.request.order</field>
        <field name="inherit_id" ref="stock_request.stock_request_order_search" />
        <field name="arch" type="xml">
            <xpath expr='//filter[@name="location"]' position="after">
                <filter
                    string="Operation Type"
                    name="picking_type_id"
                    domain="[]"
                    context="{'group_by': 'picking_type_id'}"
                />
            </xpath>
        </field>
    </record>

    <record id="stock_request_order_form_picking_type" model="ir.ui.view">
        <field name="name">stock.request.order.form.picking.type</field>
        <field name="model">stock.request.order</field>
        <field name="inherit_id" ref="stock_request.stock_request_order_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='warehouse_id']" position="after">
                <field
                    name="picking_type_id"
                    domain="[('code', '=', 'stock_request_order')]"
                    context="{'default_code': 'stock_request_order'}"
                    attrs="{'readonly': [('state', '!=', 'draft')]}"
                />
            </xpath>
        </field>
    </record>

    <record id="action_picking_dashboard" model="ir.actions.act_window">
        <field name="name">Stock Request Orders</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">stock.request.order</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" eval="False" />
        <field name="search_view_id" ref="stock_request_order_search" />
        <field name="domain">[('picking_type_id', '=', active_id)]</field>
    </record>

    <record id="action_stock_request_order_form" model="ir.actions.act_window">
        <field name="name">Stock Request Orders</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">stock.request.order</field>
        <field name="view_mode">form</field>
    </record>

    <menuitem
        id="menu_stock_request_order"
        action="stock_request.stock_request_order_action"
        name="Stock Request Orders"
        parent="stock.menu_stock_warehouse_mgmt"
        sequence="30"
    />

</odoo>
