Search filter disappears after reloading the current tab

Search filter is saving after clicking the button “Reload/Undo” in the tool bar. But it disappears after reloading the current tab with the help of client side action keyword “reload”. This looks like a bug, isn’t it?
We are using Tryton Desktop Client 5.4.8.

I do not think we should consider it as a bug. The goal of the reload client action is to display the list as if it was freshly opened. This is mainly to display a new record that would have been created.

Maybe there is the need to add a new action which reloads and keeps the current domain.

@bell could you explain us which is your current use case?

Displaing new records is great. But why isn’t the search filter being saved?
It is logical for the result of the reload client action to be the same as the result of pressing the button Reload/Undo.

  1. Open any tab with the reload client action.
  2. Set some search filter in this tab.
  3. Do the reload client action.
  4. The search filter disappears.

Why should it be logical? If we do that we can not ensure that new records will be displayed.
So for me as long as there is not valid use case, the current behavior is the best.

But the button Reload/Undo displays new records and saves the search filter.
Why shouldn’t the reload client action do the same?

Because the goal is to display new records. The server code can not know what filter the user has applied.

If someone needs to save the search filter after the reload client action, then here is the patch for Tryton Desktop Client 5.4.8:

Index: tryton/gui/window/view_form/screen/
--- a/tryton/gui/window/view_form/screen/
+++ b/tryton/gui/window/view_form/screen/
@@ -1201,7 +1201,7 @@
         elif action == 'reload':
             if (self.current_view.view_type in ['tree', 'graph', 'calendar']
                     and not self.parent):
-                self.search_filter()
+                self.search_filter(self.screen_container.get_text())
         elif action == 'reload menu':
             from tryton.gui import Main

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.