Improve Search Filter on client


We notice some differences about the search filter between SAO and GTK Client.

  • On GTK CLIENT the focus is not set when opening the form. So the form search is not close when switching between tabs.
  • On SAO there is a search icon on the search bar (LOOK GLASS) to refresh data with filter. Not present on GTK CLIENT.

We would like also improve some features.

  • It is not possible to use operator (>,<,=,!=) on the search form for a numeric field.
  • It is not possible to clear the search bar and refresh in one operation. (delete the text in the search and refresh)


  • On the GTK CLIENT set the focus on the first field when opening the form. Now the form has not the focus.
  • On the GTK CLIENT, add an icon LOOK GLASS on the search bar.
  • Add an icon (X) to clear and refresh the search filter
  • Add a combobox with operator (>,<,=,!=) before numeric field


I think I’d be better to have two fields so the user can put “from value” - “to value”. Just like with date fields.

The only drawback I see with this is that it is not possible to define != with this method…

1 Like

And for the equal, you should write same value in both fields?

Yes, that is the current behaviour of date fields

Here the focus is set on the first field and there is a call to grab the focus.

GTK allows only one icon each side of an entry, that’s why there is no other button for now.

Seems not working, there is no focus on the first input field. So when you click on another tab, search window stay foreground…
If we put focus on the first input field of the search window then the search window has a correct behavior (disappear when clicking outside or clicking on a tab)

Hum, I created Issue 8061: Set focus on first entry of filter window - Tryton issue tracker

I checked the Google behavior. They have a clear search button that appears when the input is filled but only on mobile device. I think the rational is that on mobile it is difficult to clear the text but on desktop is it easy.
So I propose to implement only on sao the clear (which can support multiple buttons on the input group) only for small screen and not on tryton at all. Issue 8099: Add clear button on small screen - Tryton issue tracker

I’m wondering if the behavior could not be improved by filling the second part automatically when the first is filled. So this will make the default operator being equal until the user change or remove the second part. The automatic filling should only happen when the first part is changed from empty to something.

1 Like

Here is Issue 8104: Use by default equals operator for range - Tryton issue tracker

Sounds like a good idea.

Here is the last piece which implements this feature: Issue 8149: Use range for numbers in filter box - Tryton issue tracker

1 Like

This topic was automatically closed after 6 days. New replies are no longer allowed.