From 5f776a8213b5240c2e27994182e0587f87e0125f Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 21 Dec 2007 08:33:16 +0000 Subject: [PATCH] Bugfix bzr revid: fp@tinyerp.com-41e730d287152c8cfb6f958b898a449557e85ad6 --- addons/account/report/aged_trial_balance.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account/report/aged_trial_balance.py b/addons/account/report/aged_trial_balance.py index 69f5a7f82ed..ef990f72cb1 100644 --- a/addons/account/report/aged_trial_balance.py +++ b/addons/account/report/aged_trial_balance.py @@ -69,15 +69,13 @@ class aged_trial_report(report_sxw.rml_parse): before = self.cr.fetchone() values['before'] = before and before[0] or "" for i in range(5): - a2 = "SELECT SUM(debit-credit) \ FROM account_move_line AS line, account_account \ WHERE (line.account_id=account_account.id) AND (account_account.type IN (%s)) \ - AND (date >= %s) AND (date <= %s) \ + AND (date >= '%s') AND (date <= '%s') \ AND (partner_id=%d) AND (reconcile_id IS NULL) \ AND line.state<>'draft' AND (line.period_id in (SELECT id FROM account_period WHERE fiscalyear_id=%d)) \ AND (account_account.company_id = %d) AND account_account.active" %(form['computation'], form[str(i)]['start'], form[str(i)]['stop'], partner['id'], form['fiscalyear'], form['company_id']) - self.cr.execute(a2) during = self.cr.fetchone() values[str(i)] = during and during[0] or ""