diff options
| author | Olivier Dony <odo@openerp.com> | 2011-11-03 01:52:34 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2011-11-03 01:52:34 +0100 |
| commit | b3664a2c49fd1763c675c1b2d3e72dc71daba8a6 (patch) | |
| tree | 391d70c624b4649d178a02171fafdaa4110d9c56 | |
| parent | ad7e2a5ee9053d948a16f5da4ea128327eccf201 (diff) | |
[FIX] hr_timesheet: fix YAML test so it works at any hour of the day
bzr revid: odo@openerp.com-20111103005234-sg70d1zdd32yqqnl
| -rw-r--r-- | addons/hr_timesheet/test/test_hr_timesheet.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/hr_timesheet/test/test_hr_timesheet.yml b/addons/hr_timesheet/test/test_hr_timesheet.yml index 16fd59b69ba..7ce2908f24f 100644 --- a/addons/hr_timesheet/test/test_hr_timesheet.yml +++ b/addons/hr_timesheet/test/test_hr_timesheet.yml @@ -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. |
