<?xml version="1.0"?>
<search string="Search Invoice">
                    <field name="name" string="Invoice" filter_domain="[                                 '|', '|' , '|', '|',                                 ('name', 'ilike', self), ('invoice_origin', 'ilike', self),                                 ('ref', 'ilike', self), ('payment_reference', 'ilike', self),                                 ('partner_id', 'child_of', self)]"/>
                    <field name="journal_id"/>
                    <field name="partner_id" operator="child_of"/>
                    <field name="invoice_user_id" string="Salesperson" domain="[('share', '=', False)]"/>
                    <field name="date" string="Period"/>
                    <field name="line_ids" string="Invoice Line"/>
                    <filter domain="[('invoice_user_id', '=', uid)]" name="myinvoices" help="My Invoices"/>
                    <separator/>
                    <filter name="draft" string="Draft" domain="[('state','=','draft')]"/>
                    <filter name="posted" string="Posted" domain="[('state', '=', 'posted')]"/>
                    <filter name="cancel" string="Cancelled" domain="[('state', '=', 'cancel')]"/>
                    <separator/>
                    <filter string="To Check" name="to_check" domain="[('to_check', '=', True)]"/>
                    <separator/>
                    <!-- not_paid & partial -->
                    <filter name="open" string="Unpaid" domain="[('state', '=', 'posted'), ('payment_state', 'in', ('not_paid', 'partial'))]"/>
                    <!-- in_payment & paid -->
                    <filter name="closed" string="Paid" domain="[('state', '=', 'posted'), ('payment_state', 'in', ('in_payment', 'paid'))]"/>
                    <!-- reversed -->
                    <filter name="reversed" string="Reversed" domain="[('state', '=', 'posted'), ('payment_state', '=', 'reversed')]"/>
                    <!-- overdue -->
                    <filter name="late" string="Overdue" domain="[                         ('invoice_date_due', '&lt;', time.strftime('%Y-%m-%d')),                         ('state', '=', 'posted'),                         ('payment_state', 'in', ('not_paid', 'partial'))                     ]" help="Overdue invoices, maturity date passed"/>
                    <separator/>
                    <filter name="invoice_date" string="Invoice Date" date="invoice_date"/>
                    <filter name="date" invisible="context.get('default_move_type') in ('out_invoice', 'out_refund', 'out_receipt')" string="Accounting Date" date="date"/>
                    <filter name="due_date" string="Due Date" date="invoice_date_due"/>
                    <separator/>
                    <filter invisible="1" string="Late Activities" name="activities_overdue" domain="[('my_activity_date_deadline', '&lt;', context_today().strftime('%Y-%m-%d'))]" help="Show all records which has next action date is before today"/>
                    <filter invisible="1" string="Today Activities" name="activities_today" domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/>
                    <filter invisible="1" string="Future Activities" name="activities_upcoming_all" domain="[('my_activity_date_deadline', '&gt;', context_today().strftime('%Y-%m-%d'))]"/>
                    <group expand="0" string="Group By">
                        <filter string="Salesperson" name="salesperson" context="{'group_by':'invoice_user_id'}"/>
                        <filter string="Partner" name="groupy_by_partner" domain="[]" context="{'group_by': 'partner_id'}"/>
                        <filter string="Status" name="status" context="{'group_by':'state'}"/>
                        <filter string="Journal" name="groupy_by_journal" domain="[]" context="{'group_by': 'journal_id'}"/>
                        <separator/>
                        <filter string="Invoice Date" name="invoicedate" context="{'group_by': 'invoice_date'}"/>
                        <filter string="Due Date" name="duedate" context="{'group_by': 'invoice_date_due'}"/>
                        <filter string="Date" name="group_by_date" context="{'group_by': 'date'}"/>
                        <filter string="Company" name="group_by_company" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/>
                        <filter string="Sequence Prefix" name="group_by_sequence_prefix" context="{'group_by': 'sequence_prefix'}" invisible="1"/>
                    </group>
               </search>
            