تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
4848 أدوات العرض

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!

الصورة الرمزية
إهمال
أفضل إجابة

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

 

 

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
سبتمبر 25
1854
1
يوليو 21
2794
0
أبريل 16
4362
1
مايو 15
3984
0
يناير 25
2612