Fix xxx2many WinSearch callback

Typo was introduced in changeset 4d0d16477712
This commit is contained in:
Cédric Krier committed 2012-03-06 15:56:45 +01:00
1 parent 82481bfa21
commit 8e9b3e0971
2 files changed
+7 -9

No files matched your search

@@ -141,12 +141,11 @@ class Many2Many(WidgetInterface):
return False
def callback(result):
res_id = None
if result:
res_id, _ = result[0]
self.focus_out = True
self.screen.load(ids, modified=True)
self.screen.display(res_id=res_id)
if result:
ids = [x[0] for x in result]
self.screen.load(ids, modified=True)
self.screen.display(res_id=ids[0])
self.screen.set_cursor()
self.wid_text.set_text('')
if len(ids) != 1 or not value:
@@ -323,11 +323,10 @@ class One2Many(WidgetInterface):
return False
def callback(result):
res_id = None
if result:
res_id, = result[0]
self.screen.load(ids, modified=True)
self.screen.display(res_id=res_id)
ids = [x[0] for x in result]
self.screen.load(ids, modified=True)
self.screen.display(res_id=ids[0])
self.screen.set_cursor()
self.wid_text.set_text('')
if len(ids) != 1: