avoid crash when val is none

bzr revid: nel@tinyerp.com-20090423120715-2l4d5pnfl3i3r4u9
This commit is contained in:
Najlaâ EL KHAYAT 2009-04-23 14:07:15 +02:00
parent 7c82eeeda6
commit a9d736b0bd
1 changed files with 1 additions and 0 deletions

View File

@ -113,6 +113,7 @@ class res_partner(osv.osv):
for id in ids:
res[id] = {}.fromkeys(field_names, 0)
for pid,type,val in cr.fetchall():
if val is None: val=0
res[pid][maps[type]] = (type=='receivable') and val or -val
return res