[FIX] point_of_sale: Close cashbox report error corrected.

bzr revid: uco@tinyerp.com-20100927123338-c8bmbapxiv30e3a5
This commit is contained in:
uco (Open ERP) 2010-09-27 18:03:38 +05:30
parent 27dc3f030a
commit 9f88bde3ce
1 changed files with 7 additions and 7 deletions

View File

@ -91,13 +91,13 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
return False
def _get_partner(self,statement):
res = {}
sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp
where absl.partner_id = rp.id
and absl.pos_statement_id = %d"""%(statement['pos_statement_id'])
self.cr.execute(sql)
res = self.cr.dictfetchall()
if res :
return res[0]['name']
if statement['pos_statement_id']:
sql =""" select rp.name from account_bank_statement_line as absl,res_partner as rp
where absl.partner_id = rp.id
and absl.pos_statement_id = %d"""%(statement['pos_statement_id'])
self.cr.execute(sql)
res = self.cr.dictfetchall() or {}
return res and res[0]['name']
else :
return 0.00