[FIX]: fix a name_search for account move

bzr revid: mga@tinyerp.com-20100813123519-wmz3jyddfr8vjb51
This commit is contained in:
Mantavya Gajjar 2010-08-13 18:05:19 +05:30
parent 23e3cf71de
commit 8d4041f04b
2 changed files with 3 additions and 3 deletions

View File

@ -1050,8 +1050,8 @@ class account_move(osv.osv):
ids = []
if name:
ids += self.search(cr, user, [('state','=','draft'), ('id','=',name)], limit=limit)
ids += self.search(cr, user, [('id','=',name)], limit=limit)
return self.name_get(cr, user, ids, context=context)
def name_get(self, cursor, user, ids, context=None):

View File

@ -337,7 +337,7 @@ class account_move_line(osv.osv):
invoice_id = res[line_id]
res[line_id] = (invoice_id, invoice_names[invoice_id])
return res
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []