[FIX] hr_timesheet_sheet: fix yaml to make dynamic dates for new timesheet remove hardcoding

bzr revid: skh@tinyerp.com-20110506102710-be1zaqnlwdkd9abf
This commit is contained in:
skh 2011-05-06 15:57:10 +05:30
parent 55329ffbf6
commit 6e53fe7629
1 changed files with 8 additions and 9 deletions

View File

@ -62,12 +62,11 @@
-
I create my current timesheet for "Mark Johnson".
-
-
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
date_current: !eval "'%s-05-26' %(datetime.now().year)"
date_from: !eval "'%s-05-01' %(datetime.now().year)"
date_to: !eval "'%s-05-31' %(datetime.now().year)"
name: !eval "'Week-22(%s)' %(datetime.now().year)"
date_current: !eval time.strftime('%Y-%m-%d')
date_from: !eval time.strftime('%Y-%m-01')
name: !eval time.strftime('%U')
state: new
user_id: base.user_demo
employee_id: 'hr_employee_employee0'
@ -77,7 +76,7 @@
!record {model: hr.attendance, id: hr_attendance_0}:
action: sign_in
employee_id: 'hr_employee_employee0'
name: !eval "'%s-05-26 10:08:08' %(datetime.now().year)"
name: !eval time.strftime('%Y-%m-%d')+' '+'%s:%s:%s' %(datetime.now().hour,datetime.now().minute,datetime.now().second)
-
At the time of logout, I create attendance and perform "Sign Out".
@ -85,7 +84,7 @@
!record {model: hr.attendance, id: hr_attendance_1}:
action: sign_out
employee_id: 'hr_employee_employee0'
name: !eval "'%s-05-26 15:10:55' %(datetime.now().year)"
name: !eval time.strftime('%Y-%m-%d')+' '+'%s:%s:%s' %(datetime.now().hour+3,datetime.now().minute,datetime.now().second)
-
I create Timesheet Entry for time spend on today work.
@ -94,7 +93,7 @@
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
timesheet_ids:
- account_id: account.analytic_sednacom
date: !eval "'%s-05-26' %(datetime.now().year)"
date: !eval time.strftime('%Y-%m-%d')
name: 'Develop yaml for hr module'
unit_amount: 3.00
amount: -90.00
@ -125,7 +124,7 @@
!record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
timesheet_ids:
- account_id: account.analytic_sednacom
date: !eval "'%s-05-26' %(datetime.now().year)"
date: !eval time.strftime('%Y-%m-%d')
name: 'Develop yaml for hr module'
unit_amount: 2.0
amount: -90.00