Don't show WinSearch on Many2Many if it has a single result
If the search result is a single record, we add it directly instead of showing the pop-up. issue7476 review45591002
This commit is contained in:
1 parent
e698eb0cae
commit
5a4482fa85
1 file changed
+4
-1
@@ -170,7 +170,10 @@ class Many2Many(Widget):
|
||||
new=self.attrs.get('create', True),
|
||||
title=self.attrs.get('string'))
|
||||
win.screen.search_filter(quote(value))
|
||||
win.show()
|
||||
if len(win.screen.group) == 1:
|
||||
win.response(None, gtk.RESPONSE_OK)
|
||||
else:
|
||||
win.show()
|
||||
|
||||
def _sig_remove(self, *args):
|
||||
self.screen.remove(remove=True)
|
||||
|
||||
Reference in new issue
Block a user