Fix view timesheet by day to take only sign_in/sign_out action
authorced <>
Thu, 20 Sep 2007 11:04:21 +0000 (11:04 +0000)
committerced <>
Thu, 20 Sep 2007 11:04:21 +0000 (11:04 +0000)
bzr revid: ced-96083cca776eb529bd439ab453a118dfb8892e7c

addons/hr_timesheet_sheet/hr_timesheet_sheet.py

index 62427fc..690d71f 100644 (file)
@@ -480,6 +480,7 @@ class hr_timesheet_sheet_sheet_day(osv.osv):
                                                                SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance
                                                        from
                                                                hr_attendance a
+                                                       WHERE action in ('sign_in', 'sign_out')
                                                        group by a.name::date, a.sheet_id
                                                )) AS foo
                                                GROUP BY name, sheet_id