Search all accounts that begin with code and not all containing code when search on the code of an account

bzr revid: hmo@tinyerp.com-20080819112252-o20dg5bijmszlc1z
This commit is contained in:
Harshad Modi 2008-08-19 16:52:52 +05:30
parent 94cbe9e60b
commit a513f446d0
1 changed files with 5 additions and 2 deletions

View File

@ -141,6 +141,9 @@ class account_account(osv.osv):
context = {}
pos = 0
while pos<len(args):
if args[pos][0]=='code' and args[pos][1] in ('like','ilike'):
args[pos][1]='=like'
args[pos][2]=str(args[pos][2])+'%'
if args[pos][0]=='journal_id':
if not args[pos][2]:
del args[pos]