Merge lp:~vauxoo/openobject-client/trunk-bug-880592-moylop260 into lp:openobject-client

Proposed by Moisés López - http://www.vauxoo.com
Status: Needs review
Proposed branch: lp:~vauxoo/openobject-client/trunk-bug-880592-moylop260
Merge into: lp:openobject-client
Diff against target: 17 lines (+5/-2)
1 file modified
bin/widget/view/form_gtk/many2many.py (+5/-2)
To merge this branch: bzr merge lp:~vauxoo/openobject-client/trunk-bug-880592-moylop260
Reviewer Review Type Date Requested Status
OpenERP sa GTK client R&D Pending
Review via email: mp+80170@code.launchpad.net

Description of the change

[WISHLIST] [6.0] Widget many2many no set directly id when len is just one

Widget many2many no set directly id when len is just one

In the widget many2one when return one value, these set it when these value without sub view
But in many2many no is this case

To post a comment you must log in.

Unmerged revisions

1986. By Moisés López - http://www.vauxoo.com

[IMP] Add to widget many2many set direct value when len ids == 1, same case of many2one

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/widget/view/form_gtk/many2many.py'
2--- bin/widget/view/form_gtk/many2many.py 2011-05-26 12:41:27 +0000
3+++ bin/widget/view/form_gtk/many2many.py 2011-10-24 01:47:24 +0000
4@@ -152,8 +152,11 @@
5 self.wid_text.get_text(), domain, 'ilike', context)
6 ids = [oid for oid, _ in records]
7 self.wid_text.set_text('')
8- win = win_search(self.attrs['relation'], sel_multi=True, ids=ids, context=context, domain=domain, parent=self._window)
9- ids = win.go()
10+ if len(ids) == 1:
11+ pass
12+ else:
13+ win = win_search(self.attrs['relation'], sel_multi=True, ids=ids, context=context, domain=domain, parent=self._window)
14+ ids = win.go()
15
16 if ids != None:
17 if self.name in self.model.pager_cache: