콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
5291 화면

When I have created a search and I search, for example, by user, I can type just one letter and find all that contains that letter.

How come I can't search numbers in the same way?

eg. when I need user named "user", I can type in the search bar "us" and get the list

when I need ticket number 12345678, I can't type "123" and get a list, I have to type the full number out.

Is this a rule or is there a way around this?

아바타
취소
베스트 답변

@Siobhan,

You could change the filter_domain used in the SEARCH view.

<field name="ticket_number" string="Ticket number" filter_domain="[('ticket_number','ilike',self)]"/>

아바타
취소
베스트 답변

You can enable developer mode by clicking on the top right corner and then "About Odoo" and then "Activate Developer Mode". After that, as an example, you can click on Accounting -> Customers and view the Search View in the Debug menu.

In there you will find rules that define how searching is done on a certain object.



아바타
취소
작성자

Thank you for this but I can't find any example on a search by a number. Checked the helpdesk module and it doesn't have this search function either

작성자 베스트 답변

For this particular case as ticket number was not been used for arithmetic, I change it to a char and was able to do a search. 

아바타
취소
관련 게시물 답글 화면 활동
1
9월 15
5383
1
3월 15
8707
3
6월 16
4454
1
7월 25
487
Search a message 해결 완료
1
2월 25
1245