From 9e8d29c986358c879be61b24a7409d78ca274479 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 1 Jul 2015 12:48:16 +0200 Subject: [PATCH] [FIX] project_timesheet: analyis view must include lines without timesheet While working on project task it is possible to record "task work" that will automatically create timesheet lines. These are not by default included into any timesheet, but they need to appear in reporting nonetheless. These lines disappeared from the analysis view after the performance improvement of rev. fe31451899ea84fbffe1bc17d7f41ec10a8d786a which introduced a JOIN with the `totals` CTE table - and should have been LEFT JOIN. --- addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py index d3e0ea59957..052c9fac080 100644 --- a/addons/hr_timesheet_sheet/report/hr_timesheet_report.py +++ b/addons/hr_timesheet_sheet/report/hr_timesheet_report.py @@ -73,7 +73,7 @@ class hr_timesheet_report(osv.osv): htss.state""" def _from(self): - return super(hr_timesheet_report, self)._from() + "left join hr_timesheet_sheet_sheet as htss ON (hat.sheet_id=htss.id) join totals as t on (t.sheet_id = hat.sheet_id and t.date = aal.date)" + return super(hr_timesheet_report, self)._from() + "left join hr_timesheet_sheet_sheet as htss ON (hat.sheet_id=htss.id) left join totals as t on (t.sheet_id = hat.sheet_id and t.date = aal.date)" def _group_by(self): return super(hr_timesheet_report, self)._group_by() + """,