Odoo Help


Tag Search Filters: How do we add all the tags as filter options?

Michael Watchorn
on 11/18/14, 7:31 PM 915 views

I'm trying to make all the tags (aka categ_ids) available as search filters.
I have successfully added my own filter "Has Email", and it works. However my template code isn't generating anything, not even errors.

Hopefully you can find something wrong with my template code, or propose another method?


<?xml version="1.0"?>
    Qweb Template for Opportunity Tag Cloud
        <record id="crm_oppor_search_tags" model="ir.ui.view">
            <field name="name">Opportunity Tag Cloud</field>
            <field name="model">crm.lead</field>
            <field name="inherit_id" ref="crm.view_crm_case_opportunities_filter"/>
            <field name="arch" type="xml">
                          <xpath expr="//filter[@string='New Mail']" position="after">
                              <filter string="Has Email" name="has_email"
                            domain="[('email_from', 'ilike', '@')]"/>
                              <separator />
                        <template id="oppor_tags">
                            <t t-foreach="categ_ids" t-as="tag">
                                <filter t-att-string="{{ tag.lower() }}" t-att-name="tag_{{ tag.lower()}}" t-att-domain="['categ_ids','=','{{ tag.lower() }}']" help='Opportunities tagged with the word "{{ tag.lower() }}"'/>


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/18/14, 7:31 PM
Seen: 915 times
Last updated: 3/16/15, 8:10 AM