Error Solved :

[Mon Oct 20 11:14:27 2008] ERROR:report:report account.partner.balance:
Traceback (most recent call last):
  File "/home/apa/Bazar Branches/openobject-server/bin/report/report_sxw.py", line 395, in _eval
    res = eval(expr, self.localcontext)
  File "<string>", line 1, in <module>
  File "/home/apa/Bazar Branches/openobject-addons/account/report/partner_balance.py", line 560, in _sum_scredit
    result_tmp = self.cr.fetchone()[0]
TypeError: 'NoneType' object is unsubscriptable

'NoneType' object is unsubscriptable
expr:  (sum_scredit(data)-sum_sdebit(data)) or '0.0'

bzr revid: patelamit2003@gmail.com-20081020054617-9aj0rrpo33vp31x5
This commit is contained in:
apa-tiny 2008-10-20 11:16:17 +05:30
parent 7536a0a676
commit 3b06d075ed
1 changed files with 2 additions and 1 deletions

View File

@ -556,8 +556,9 @@ class partner_balance(report_sxw.rml_parse):
'GROUP BY partner_id',
(self.date_lst[0],))
print"self.cr.fetchone()[0]",self.cr.fetchone()[0]
if self.cr.fetchone() != None:
result_tmp = float(self.cr.fetchone()[0])
result_tmp = self.cr.fetchone()[0]
else:
result_tmp = 0.0
#