Odoo Help

Welcome!

This community 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.

1

Filter a M2O field without domain or Clear a domain from a tree view

By
ASP
on 12/9/14, 8:41 AM 592 views

Hi All,

In my current project, I'm using Odoo V8. I've a M2O field partner_id in my custom module, with ref. to res.partner

Now I've 2 boolean fields (radio buttons: 1. customer, 2.supplier), displaying just above the partner_id.

So whichever among these radio buttons get selected/checked, I want to filter the partner list with it. 

For example, if customer radio is checked then I want to list only customers and if supplier radio is checked then the list of suppliers.

This can be achievable by using dynamic domain from onchange() method. (Working for me)

But my real issue is, if we click on the seach more... option in the partner_id we need to open the list of all partners without any domain/filter (both client & suppliers), no matter what radio is selected & what domain has been applied.

Currently when I'm clicking the search more... option it's opening a tree view of partners but with the domain as customer/supplier.

I want to clear/remove this domain from the list. Please help me with this.

As the domain applied on a filter is not displaying as a filter on the search view so that I can close it to clear the filter.

Any help or suggestions would be appreciated :)

Cheers
ASP:)

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 12/9/14, 8:41 AM
Seen: 592 times
Last updated: 7/30/15, 5:13 AM