[FIX] hr_timesheet: fix YAML test so it works at any hour of the day

bzr revid: odo@openerp.com-20111103005234-sg70d1zdd32yqqnl
This commit is contained in:
Olivier Dony 2011-11-03 01:52:34 +01:00
parent ad7e2a5ee9
commit b3664a2c49
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@
!record {model: hr.attendance, id: hr_attendance_0}:
action: sign_in
employee_id: 'hr_employee_fracline1'
name: !eval time.strftime('%Y-%m-%d')+' '+'%s:%s:%s' %(datetime.now().hour-2,datetime.now().minute,datetime.now().second)
name: !eval (datetime.now()-timedelta(hours=2)).strftime('%Y-%m-%d %H:%M:%S')
-
I create attendance and perform "Sign Out" action.
@ -87,7 +87,7 @@
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_out
employee_id: 'hr_employee_fracline1'
name: !eval time.strftime('%Y-%m-%d')+' '+'%s:%s:%s' %(datetime.now().hour-1,datetime.now().minute,datetime.now().second)
name: !eval (datetime.now()-timedelta(hours=1)).strftime('%Y-%m-%d %H:%M:%S')
-
On "Sign In/Sign Out by Project" wizard i click on "Sign In/Sign Out" button of this wizard.