Merge lp:~numerigraphe/openobject-client/6.x-o2m-focus-reset into lp:openobject-client/6.1

Proposed by Numérigraphe
Status: Needs review
Proposed branch: lp:~numerigraphe/openobject-client/6.x-o2m-focus-reset
Merge into: lp:openobject-client/6.1
Diff against target: 68 lines (+19/-3)
4 files modified
bin/widget/model/record.py (+1/-1)
bin/widget/screen/screen.py (+2/-2)
bin/widget/view/form_gtk/one2many_list.py (+1/-0)
bin/widget/view/list.py (+15/-0)
To merge this branch: bzr merge lp:~numerigraphe/openobject-client/6.x-o2m-focus-reset
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+138149@code.launchpad.net

Description of the change

Same proposal as https://code.launchpad.net/~numerigraphe/openobject-client/6.x-o2m-focus-reset/+merge/138148
I propose to include as a bugfix in 6.1.
Lionel Sausin

To post a comment you must log in.

Unmerged revisions

1792. By Chris Biersbach (OpenERP)

[FIX] Fix latest improvement in cases where the o2m field has more lines than can be displayed at once

1791. By Chris Biersbach (OpenERP)

[IMP] Keep the current selection in o2m tree views when parent record is reloaded

1790. By Chris Biersbach (OpenERP)

[IMP] Keep the current selection in o2m forms when parent record is reloaded

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/widget/model/record.py'
--- bin/widget/model/record.py 2012-02-28 09:14:42 +0000
+++ bin/widget/model/record.py 2012-12-05 13:42:37 +0000
@@ -400,7 +400,7 @@
400 else:400 else:
401 raise Exception, 'Unallowed button type'401 raise Exception, 'Unallowed button type'
402 if screen.current_model and screen.current_view.view_type != 'tree':402 if screen.current_model and screen.current_view.view_type != 'tree':
403 screen.reload()403 screen.reload(res_id=id)
404404
405 del screen405 del screen
406406
407407
=== modified file 'bin/widget/screen/screen.py'
--- bin/widget/screen/screen.py 2012-10-02 09:17:11 +0000
+++ bin/widget/screen/screen.py 2012-12-05 13:42:37 +0000
@@ -745,11 +745,11 @@
745 return True745 return True
746 return False746 return False
747747
748 def reload(self):748 def reload(self, res_id=None):
749 self.current_model.reload()749 self.current_model.reload()
750 if self.parent:750 if self.parent:
751 self.parent.reload()751 self.parent.reload()
752 self.display()752 self.display(res_id=res_id)
753753
754 def remove(self, unlink = False):754 def remove(self, unlink = False):
755 id = False755 id = False
756756
=== modified file 'bin/widget/view/form_gtk/one2many_list.py'
--- bin/widget/view/form_gtk/one2many_list.py 2012-10-03 06:39:32 +0000
+++ bin/widget/view/form_gtk/one2many_list.py 2012-12-05 13:42:37 +0000
@@ -422,6 +422,7 @@
422 name = str(signal_data[0] + 1)422 name = str(signal_data[0] + 1)
423 line = '(%s/%s of %s)' % (name, signal_data[1], signal_data[2])423 line = '(%s/%s of %s)' % (name, signal_data[1], signal_data[2])
424 self.label.set_text(line)424 self.label.set_text(line)
425 self.pager.set_sensitivity()
425426
426 def _sig_refresh(self, *args):427 def _sig_refresh(self, *args):
427 pass428 pass
428429
=== modified file 'bin/widget/view/list.py'
--- bin/widget/view/list.py 2011-11-29 09:00:41 +0000
+++ bin/widget/view/list.py 2012-12-05 13:42:37 +0000
@@ -592,6 +592,21 @@
592 if self.screen.parent and isinstance(self.screen.parent, ModelRecord):592 if self.screen.parent and isinstance(self.screen.parent, ModelRecord):
593 self.screen.parent.reload()593 self.screen.parent.reload()
594 current_active_model.reload()594 current_active_model.reload()
595 # we force setting current_model here to avoid tree view blinking
596 # (cause by view selecting the 1st record, then re-displaying itself,
597 # then selecting real active record)
598 self.screen.current_model = current_active_model
599 if selection.get_mode() == gtk.SELECTION_MULTIPLE:
600 path_active_model = self.store.on_get_path(current_active_model)
601 if path_active_model not in paths:
602 # clicked row is not in active selection,
603 # select only the current row
604 selection.select_path(path_active_model)
605 else:
606 # keep current rows selected
607 for path in paths:
608 selection.select_path(path)
609 self.widget_tree.scroll_to_cell(path_active_model)
595610
596 else:611 else:
597 # Here it goes for right click612 # Here it goes for right click

Subscribers

People subscribed via source and target branches