diff --git a/tryton/gui/window/view_form/view/list_gtk/parser.py b/tryton/gui/window/view_form/view/list_gtk/parser.py index e17a1048da..3334a67936 100644 --- a/tryton/gui/window/view_form/view/list_gtk/parser.py +++ b/tryton/gui/window/view_form/view/list_gtk/parser.py @@ -55,11 +55,14 @@ def sort_model(column, treeview, screen): column.arrow_show = False column.arrow.hide() store = treeview.get_model() + unsaved_records = [x for x in store.group if x.id < 0] if screen.search_count == len(store): ids = screen.search_filter(only_ids=True) store.sort(ids) else: screen.search_filter() + for record in unsaved_records: + store.group.append(record) class ParserTree(ParserInterface):