<?xml version="1.0"?>
<search string="Purchase Orders">
                <filter string="Requests for Quotation" name="quotes" domain="[('state','in',('draft','sent'))]"/>
                <filter string="Purchase Orders" name="orders" domain="[('state','!=','draft'), ('state','!=','sent'), ('state','!=','cancel')]"/>
                <filter string="Confirmation Date Last Year" name="later_than_a_year_ago" domain="[('date_approve', '&gt;=', ((context_today()-relativedelta(years=1)).strftime('%Y-%m-%d')))]"/>
                <filter name="filter_date_order" date="date_order"/>
                <filter name="filter_date_approve" date="date_approve" default_period="month"/>
                <field name="partner_id"/>
                <field name="product_id"/>
                <group expand="0" string="Extended Filters">
                    <field name="user_id"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="date_order"/>
                    <field name="date_approve"/>
                    <field name="category_id" filter_domain="[('category_id', 'child_of', self)]"/>
                </group>
                <group expand="1" string="Group By">
                    <filter string="Vendor" name="group_partner_id" context="{'group_by':'partner_id'}"/>
                    <filter string="Vendor Country" name="country_id" context="{'group_by':'country_id'}"/>
                    <filter string="Buyer" name="user_id" context="{'group_by':'user_id'}"/>
                    <filter string="Product" name="group_product_id" context="{'group_by':'product_id'}"/>
                    <filter string="Product Category" name="group_category_id" context="{'group_by':'category_id'}"/>
                    <filter string="Status" name="status" context="{'group_by':'state'}"/>
                    <filter string="Company" name="company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
                    <separator/>
                    <filter string="Order Date" name="order_month" context="{'group_by': 'date_order:month'}"/>
                    <filter string="Confirmation Date" name="group_date_approve_month" context="{'group_by': 'date_approve:month'}"/>
                </group>
            </search>
        