avoid crash when val is none
bzr revid: nel@tinyerp.com-20090423120715-2l4d5pnfl3i3r4u9
This commit is contained in:
parent
7c82eeeda6
commit
a9d736b0bd
|
@ -113,6 +113,7 @@ class res_partner(osv.osv):
|
||||||
for id in ids:
|
for id in ids:
|
||||||
res[id] = {}.fromkeys(field_names, 0)
|
res[id] = {}.fromkeys(field_names, 0)
|
||||||
for pid,type,val in cr.fetchall():
|
for pid,type,val in cr.fetchall():
|
||||||
|
if val is None: val=0
|
||||||
res[pid][maps[type]] = (type=='receivable') and val or -val
|
res[pid][maps[type]] = (type=='receivable') and val or -val
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue