← Back to team overview

openerp-community team mailing list archive

lp:~openerp-community/openobject-client/6.0-bug-880592-moylop260 into lp:openobject-client/6.0

 

moylop260 - http://www.vauxoo.com has proposed merging lp:~openerp-community/openobject-client/6.0-bug-880592-moylop260 into lp:openobject-client/6.0.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #880592 in OpenERP GTK Client: "[WISHLIST] [6.0] Widget many2many no set directly id when len is just one"
  https://bugs.launchpad.net/openobject-client/+bug/880592

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-client/6.0-bug-880592-moylop260/+merge/80164

[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

-- 
https://code.launchpad.net/~openerp-community/openobject-client/6.0-bug-880592-moylop260/+merge/80164
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-client/6.0-bug-880592-moylop260.
=== modified file 'bin/widget/view/form_gtk/many2many.py'
--- bin/widget/view/form_gtk/many2many.py	2011-09-09 11:22:35 +0000
+++ bin/widget/view/form_gtk/many2many.py	2011-10-24 00:15:27 +0000
@@ -149,8 +149,11 @@
         #Updating the context in order to avoid domain of name_search and custom domain of search_context
         context.update({'name_search':self.wid_text.get_text()})
         self.wid_text.set_text('')
-        win = win_search(self.attrs['relation'], sel_multi=True, ids=ids, context=context, domain=domain, parent=self._window)
-        ids = win.go()
+        if len(ids) == 1:
+            pass
+        else:
+            win = win_search(self.attrs['relation'], sel_multi=True, ids=ids, context=context, domain=domain, parent=self._window)
+            ids = win.go()
 
         if ids == None:
             ids = []