[FIX] Check if account_id if present

lp bug: https://launchpad.net/bugs/309337 fixed

bzr revid: stephane@tinyerp.com-20081218143905-uwv9umr7mss0dlb9
This commit is contained in:
Stephane Wirtel 2008-12-18 15:39:05 +01:00
parent 6875763f60
commit 4043a46f65
1 changed files with 1 additions and 1 deletions

View File

@ -466,7 +466,7 @@ class account_move_line(osv.osv):
val['account_id'] = id2
elif jt=='purchase':
val['account_id'] = id1
if val['account_id']:
if val.get('account_id', False):
d = self.onchange_account_id(cr, uid, ids, val['account_id'])
val.update(d['value'])
return {'value':val}