From b3664a2c49fd1763c675c1b2d3e72dc71daba8a6 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 3 Nov 2011 01:52:34 +0100 Subject: [PATCH] [FIX] hr_timesheet: fix YAML test so it works at any hour of the day bzr revid: odo@openerp.com-20111103005234-sg70d1zdd32yqqnl --- addons/hr_timesheet/test/test_hr_timesheet.yml | 4 ++-- 1 file 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.