Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4836 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

 

 

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 25
1839
1
thg 7 21
2782
0
thg 4 16
4339
1
thg 5 15
3979
0
thg 1 25
2573