HR_TIMESHEET_SHEET: fix total attendance to count only sign_in and sign_out
bzr revid: ced-4161812fbb9e0f8a44d6878933967543b3351499
This commit is contained in:
parent
ae9c14730d
commit
6bff06bdf3
|
@ -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':
|
||||
|
|
Loading…
Reference in New Issue