<?xml version="1.0"?>
<search string="Opportunities Analysis">
                    <filter string="My Pipeline" name="my" domain="[('user_id', '=', uid)]"/>
                    <separator/>
                    <filter name="filter_opportunity" string="Opportunities" domain="[('type','=','opportunity')]" help="Show only opportunities" groups="crm.group_use_lead"/>
                    <filter name="filter_lead" string="Leads" domain="[('type','=', 'lead')]" help="Show only leads" groups="crm.group_use_lead"/>
                    <separator/>
                    <filter string="Active" name="filter_active" domain="[('active', '=', True)]"/>
                    <filter string="Inactive" name="filter_inactive" domain="[('active', '=', False)]"/>
                    <filter string="Won" name="won" domain="[('probability', '=', 100)]"/>
                    <filter string="Lost" name="lost" domain="[('probability', '=', 0), ('active', '=', False)]"/>
                    <field name="team_id" context="{'invisible_team': False}"/>
                    <field name="user_id" string="Salesperson"/>
                    <separator/>
                    <filter name="filter_create_date" date="create_date" default_period="this_year"/>
                    <filter string="Expected Closing" name="filter_date_deadline" date="date_deadline"/>
                    <filter string="Date Closed" name="date_closed_filter" date="date_closed"/>
                    <group expand="0" string="Extended Filters">
                        <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
                        <field name="stage_id" domain="['|', ('team_id', '=', False), ('team_id', '=', 'team_id')]"/>
                        <field name="campaign_id"/>
                        <field name="medium_id"/>
                        <field name="source_id"/>
                        <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
                        <newline/>
                        <field name="create_date"/>
                        <field name="date_open"/>
                        <field name="date_closed"/>
                    </group>
                    <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
                    <group expand="1" string="Group By">
                        <filter string="Salesperson" name="salesperson" context="{'group_by':'user_id'}"/>
                        <filter string="Sales Team" name="saleschannel" context="{'group_by':'team_id'}"/>
                        <filter string="City" name="city" context="{'group_by':'city'}"/>
                        <filter string="Country" name="country" context="{'group_by':'country_id'}"/>
                        <filter string="Company" name="company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
                        <filter string="Stage" name="stage" context="{'group_by':'stage_id'}"/>
                        <filter string="Campaign" name="compaign" domain="[]" context="{'group_by':'campaign_id'}"/>
                        <filter string="Medium" name="medium" domain="[]" context="{'group_by':'medium_id'}"/>
                        <filter string="Source" name="source" domain="[]" context="{'group_by':'source_id'}"/>
                        <separator orientation="vertical"/>
                        <filter string="Creation Date" context="{'group_by':'create_date:month'}" name="month"/>
                        <filter string="Conversion Date" context="{'group_by':'date_conversion:month'}" name="conversion_date" help="Conversion Date from Lead to Opportunity" groups="crm.group_use_lead"/>
                        <filter string="Expected Closing" context="{'group_by':'date_deadline:month'}" name="date_deadline"/>
                        <filter string="Closed Date" context="{'group_by':'date_closed'}" name="date_closed_groupby"/>
                        <filter string="Lost Reason" name="lostreason" context="{'group_by':'lost_reason_id'}"/>
                    </group>
                </search>
            