Odoo Help

1

Case insensitive group by

By
Leonardo Pistone
on 6/19/14, 7:58 AM 1,030 views

Hi,

is there a way to group by a field in a search view in a case insensitive way?

i.e. grouping "leo" and "Leo" together.

Thanks!

3
Nicolas Bessi
On 6/19/14, 8:22 AM

AFAIK you have to redefine ``read_group`` to fit your needs.

 

 

1
Leonardo Pistone
On 6/20/14, 6:04 AM

Nicolas is right: to do that I have to change read_group. It is a big method with no hooks, so the solution for now has been to copy all of it in my module and add a few lines similar to those the handle dates in the original code.

Date handling in the original is somewhat similar: dates from the same month are grouped together, while I wanted to group together string fields that are equal ignoring case.

That has been refactored in trunk to be hookable.

Thanks!

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.

Register

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)

Stats

Asked: 6/19/14, 7:58 AM
Seen: 1030 times
Last updated: 3/16/15, 8:10 AM