From 7a3717d54ce772c5ba61fbf30f85b64a36d26409 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Tue, 15 Sep 2009 21:09:38 +0530 Subject: [PATCH] [FIX] Hr_timesheet_invoice : Query calculation corrected lp bug: https://launchpad.net/bugs/430043 fixed bzr revid: jvo@tinyerp.com-20090915153938-2lcgt5kwwhvmayse --- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 6f29c056d34..0c16fb4ffd4 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -44,7 +44,7 @@ class account_analytic_account(osv.osv): res = {} for account in self.browse(cr, uid, ids): invoiced = {} - cr.execute('select distinct l.invoice_id from hr_analytic_timesheet h left join account_analytic_line l on (h.line_id=l.id) where account_id=1', (account.id,)) + cr.execute('select distinct(l.invoice_id) from hr_analytic_timesheet h left join account_analytic_line l on (h.line_id=l.id) where account_id=%s', (account.id,)) invoice_ids = filter(None, map(lambda x: x[0], cr.fetchall())) for invoice in self.pool.get('account.invoice').browse(cr, uid, invoice_ids, context): res.setdefault(account.id, 0.0)