Odoo Help


How to add search filters for partners (city, phone no. ...)

on 9/24/14, 5:04 AM 3,253 views

In my Odoo v7 installation, I want to extend "direct" filtering for partners by interactive input inside the textbox on the right above partner list (without having to use extended filtering by arrow on the right side). There appears a popup with 2 entries - description or tags - which has to be select one from after having finished typing.  What I want to do is to add a third entry there (in addition to description an tags) with phone number. I already have a custom module with an inherited partner view - I think this has to come there. Right? How can I do this?

On 9/24/14, 10:06 AM

I have just had a look at about how it is handled in res_partner_view. It has to be something similar like below.
I did not have any opportunity yet to test it - maybe with your help I can know in advance which mistakes there are...

<record model='ir.ui.view' id='view_res_partner_filter'>
    <field name='name'>res.partner.select.inherit.base.partner.filter</field>
    <field name='model'>res.partner</field>
    <field name='inherit_id' ref='base.view_res_partner_filter'/>
    <field name='arch' type='xml'>
        <field name="name" position="after">
            <field name="phone" string="Telephone" filter_domain="[('phone','ilike', self)]"/>
            <field name="city" string="City" filter_domain="[('city','ilike', self)]"/>


// Edit: That's it! Exactly does what I expected!




| 5 3 6
Jakarta, Indonesia
On 9/24/14, 6:59 AM

You should inherit the search view of res.partner.  Example can be found in crm_partner_assign/res_partner_view.xml in which base.view_res_partner_filter is added with another field to search from: grade_id.

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

1 follower(s)


Asked: 9/24/14, 5:04 AM
Seen: 3253 times
Last updated: 3/16/15, 8:10 AM