<?xml version="1.0"?>
<search string="Templates">
                    <field name="name" filter_domain="['|', '|', ('name','ilike',self), ('subject','ilike',self), ('email_to','ilike',self)]" string="Templates"/>
                    <field name="lang"/>
                    <field name="model" filter_domain="[('model', '=', raw_value)]"/>
                    <field name="model_id"/>
                    <filter name="my_templates" string="My Templates" domain="[('user_id', '=', uid)]"/>
                    <filter name="base_templates" string="Base Templates" domain="[('template_category', '=', 'base_template')]"/>
                    <filter name="custom_templates" string="Custom Templates" domain="[('template_category', '=', 'custom_template')]"/>
                    <group expand="0" string="Group by...">
                        <filter string="SMTP Server" name="smtpserver" domain="[]" context="{'group_by':'mail_server_id'}"/>
                        <filter string="Model" name="group_by_model_id" domain="[]" context="{'group_by':'model_id'}"/>
                    </group>
                </search>
            