Odoo Help


How to view Customers by State or County?

Catherine Ansbro
on 3/23/15, 2:11 PM 870 views

How can I view Customers by State (this field exists), or by County (this field doesn't yet exist)?

I am using v8.0

Catherine Ansbro
on 3/23/15, 5:27 PM

Thank you this worked! In Technical User I had to go into User Interface. After that the instructions went exactly as described. Now when I go into Customers I can group by State, or search by State. (In my case, the "States" were new ones I defined--counties in Ireland) Thank you!

Catherine Ansbro
on 3/23/15, 6:55 PM

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--

| 3 3 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 3/23/15, 4:13 PM

Open all customers : Messaging / Organizer / contacts 

At top right, you can group by country 


You can add a new group by in search view with an inherited view !

Settings -> Technical User -> Views -> Create

Name: what you want

View type: search

Object: res.partner

Inherited view: res.partner.select

View inheritance mode: Extension view


 <group string="Group By" position="inside">
    <filter string="State" context="{'group_by':'state_id'}"/>

After, you can click in tree view : first group by country, secondly state, to have a tree

country 1

   State 1


   state 2


Country 2

   undefined (no state)


Let us know if it works for you !

Alby Antony
On 3/25/15, 2:10 AM

catherine if you have a field in database for state defenitly you can apply the same code in your view

Catherine Ansbro
On 3/23/15, 4:52 PM

[I am trying to respond to the initial suggestion below, to explain why it does not work.] When I open the Sales module my only options on the left side are Customers, Leads, Opportunities, Quotations and Sales Orders.

There is a "Messaging" module at the top--but when I click on it, I am not longer in Sales and cannot see any customers. My only options in Messaging are Inbox, Organizer and My Groups.  Under Organizer, there is only Calendar. There is nothing for contacts like you describe.

***I understand that I can group by country. But I want to group by State.***  How can I  create that option?

Which version are you using ? v7 ? V8 ? V8.Sass-6 ?

Jérémy Kersten (jke)
on 3/23/15, 5:18 PM

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: 3/23/15, 2:11 PM
Seen: 870 times
Last updated: 3/25/15, 2:10 AM