[FIX] SQL Query

lp bug: https://launchpad.net/bugs/308643 fixed

bzr revid: stephane@tinyerp.com-20081216191543-l4fq5ih5efyew521
This commit is contained in:
Stephane Wirtel
2008-12-16 20:15:43 +01:00
parent 4f6843602a
commit 6d4c48770b
+1 -1
View File
@@ -168,7 +168,7 @@ class crossovered_budget_lines(osv.osv):
date_from = context['wizard_date_from']
if context.has_key('wizard_date_to'):
date_to = context['wizard_date_to']
cr.execute("select sum(amount) from account_analytic_line where account_id=%s and (date between to_date('%s','yyyy-mm-dd') and to_date('%s','yyyy-mm-dd')) and general_account_id in (%s)", (line.analytic_account_id.id,date_from,date_to,acc_ids))
cr.execute('select sum(amount) from account_analytic_line where account_id=%s and (date between to_date(%s,'yyyy-mm-dd') and to_date(%s,'yyyy-mm-dd')) and general_account_id in (%s)', (line.analytic_account_id.id,date_from,date_to,acc_ids))
result=cr.fetchone()[0]
if result==None:
result=0.00