Reviewers: ,


Please review this at http://codereview.tryton.org/626002/

Affected files:
  tryton/gui/window/view_form/view/form_gtk/one2many.py


Index: tryton/gui/window/view_form/view/form_gtk/one2many.py
===================================================================

--- a/tryton/gui/window/view_form/view/form_gtk/one2many.py
+++ b/tryton/gui/window/view_form/view/form_gtk/one2many.py
@@ -399,6 +399,10 @@
             self.focus_out = True
             return False

+        sequence = None
+        if self.screen.current_view.view_type == 'tree':
+            sequence = self.screen.current_view.widget_tree.sequence
+
         def callback(result):
             self.focus_out = True
             if result:
@@ -407,6 +411,9 @@
                 self.screen.display(res_id=ids[0])
             self.screen.set_cursor()
             self.wid_text.set_text('')
+            if sequence:
+                self.screen.group.set_sequence(field=sequence)
+
         if len(ids) != 1 or kwargs.get('win_search', False):
             WinSearch(self.attrs['relation'], callback, sel_multi=True,
                 ids=ids, context=context, domain=domain,



--
--
[email protected] mailing list



Reply via email to