[IMP] account: allow user to search on account.account name with copy/pasted value from name_get (like '110200 Debtors')
bzr revid: qdp-launchpad@tinyerp.com-20100903161942-reu3kq1sgiyzzfbp
This commit is contained in:
parent
dca67f7fd5
commit
de2a55eb29
|
@ -466,6 +466,8 @@ class account_account(osv.osv):
|
|||
ids = self.search(cr, user, [('shortcut', '=', name)]+ args, limit=limit)
|
||||
if not ids:
|
||||
ids = self.search(cr, user, [('name', operator, name)]+ args, limit=limit)
|
||||
if not ids and len(name.split()) >= 2:
|
||||
ids = self.search(cr, user, [('code', operator, name.split()[0]), ('name', operator, name.split()[1])]+ args, limit=limit)
|
||||
else:
|
||||
ids = self.search(cr, user, args, context=context, limit=limit)
|
||||
return self.name_get(cr, user, ids, context=context)
|
||||
|
|
Loading…
Reference in New Issue