HR_TIMESHEET_SHEET: fix total attendance to count only sign_in and sign_out

bzr revid: ced-4161812fbb9e0f8a44d6878933967543b3351499
This commit is contained in:
ced 2007-04-24 10:53:41 +00:00
parent ae9c14730d
commit 6bff06bdf3
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ class hr_timesheet_sheet_sheet_day(osv.osv):
def _total_attendance(self, cr, uid, ids, name, args, context):
result = {}
for day in self.browse(cr, uid, ids, context):
cr.execute('select name,action from hr_attendance where name>=%s and name<=%s and sheet_id=%d order by name', (day.name, day.name+' 23:59:59', day.sheet_id))
cr.execute('select name,action from hr_attendance where name>=%s and name<=%s and sheet_id=%d and action in (\'sign_in\', \'sign_out\') order by name', (day.name, day.name+' 23:59:59', day.sheet_id))
attendences = cr.dictfetchall()
wh = 0
if attendences and attendences[0]['action'] == 'sign_out':