From f3bc8f33243f3cf818326ba4f596fea480bca24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= <> Date: Tue, 21 Jun 2011 15:21:17 +0530 Subject: [PATCH] [FIX] hr_timesheet:Employee Timesheet report now uses unit factor correctly lp bug: https://launchpad.net/bugs/788297 fixed bzr revid: mtr@mtr-20110621095117-69bkgohrkkwv5n01 --- addons/hr_timesheet/report/user_timesheet.py | 2 +- addons/hr_timesheet/report/users_timesheet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet/report/user_timesheet.py b/addons/hr_timesheet/report/user_timesheet.py index 3cc7618ff77..533989210d6 100644 --- a/addons/hr_timesheet/report/user_timesheet.py +++ b/addons/hr_timesheet/report/user_timesheet.py @@ -67,7 +67,7 @@ class report_custom(report_rml): if user_id: # Computing the attendence by analytical account cr.execute( - "select line.date, (unit_amount) as amount, account_id, account.name "\ + "select line.date, (unit_amount / unit.factor) as amount, account_id, account.name "\ "from account_analytic_line as line, hr_analytic_timesheet as hr, "\ "account_analytic_account as account, product_uom as unit "\ "where hr.line_id=line.id and line.account_id=account.id "\ diff --git a/addons/hr_timesheet/report/users_timesheet.py b/addons/hr_timesheet/report/users_timesheet.py index db24f4a83e3..4c619721329 100644 --- a/addons/hr_timesheet/report/users_timesheet.py +++ b/addons/hr_timesheet/report/users_timesheet.py @@ -37,7 +37,7 @@ def lengthmonth(year, month): def emp_create_xml(cr, id, som, eom, emp): # Computing the attendence by analytical account cr.execute( - "select line.date, (unit_amount) as amount "\ + "select line.date, (unit_amount / unit.factor) as amount "\ "from account_analytic_line as line, hr_analytic_timesheet as hr, "\ "product_uom as unit "\ "where hr.line_id=line.id "\