[FIX] hr_attendance: adapt employee name in tests

bzr revid: rco@openerp.com-20111222144353-ulypwxol2kbhh1ys
This commit is contained in:
Raphael Collet 2011-12-22 15:43:53 +01:00
parent 479af749b9
commit da81033958
1 changed files with 4 additions and 4 deletions

View File

@ -2,14 +2,14 @@
In order to test attendance process in OpenERP, at the time of login, I use "Sign In/Sign Out" wizard for attendances.
-
!record {model: hr.sign.in.out, id: employee_sign_in}:
name: Antoine Philippe
name: Antony Lesuisse
state: absent
-
I click on this wizard to login.
-
!python {model: hr.sign.in.out}: |
obj_attendance = self.pool.get('hr.employee')
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antoine Philippe")])
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antony Lesuisse")])
if emp_ids:
employee = obj_attendance.read(cr, uid, emp_ids)[0]
self.write(cr, uid, [ref('employee_sign_in')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_ids[0]})
@ -24,7 +24,7 @@
-
!python {model: hr.sign.in.out}: |
obj_attendance = self.pool.get('hr.employee')
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antoine Philippe")])
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antony Lesuisse")])
if emp_ids:
employee = obj_attendance.read(cr, uid, emp_ids)[0]
self.write(cr, uid, [ref('employee_sign_in')], {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_ids[0]})
@ -40,7 +40,7 @@
-
!python {model: hr.sign.in.out.ask}: |
obj_attendance = self.pool.get('hr.employee')
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antoine Philippe")])
emp_ids = obj_attendance.search(cr, uid, [('user_id', '=', uid), ('name', '=', "Antony Lesuisse")])
if emp_ids:
employee = obj_attendance.read(cr, uid, emp_ids)[0]
self.write(cr, uid, [ref('hr_sign_in_out_ask_Antoine_Philippe')], {'emp_id': emp_ids[0]})