2013-02-21 07:01:28 +00:00
|
|
|
-
|
2013-02-22 09:33:15 +00:00
|
|
|
Give the access rights of Hr Officer to the user to test the process of Human Resource Management.
|
2013-02-21 07:01:28 +00:00
|
|
|
-
|
|
|
|
!context
|
|
|
|
uid: 'res_users_hr_officer'
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2011-12-15 14:45:36 +00:00
|
|
|
In order to test the process of Human Resource Management, I open Job Postion for "Developer".
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
|
|
|
!python {model: hr.job}: |
|
2011-12-15 14:45:36 +00:00
|
|
|
self.job_open(cr, uid, [ref('job_developer')])
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2011-11-25 04:52:11 +00:00
|
|
|
I check state of Job Position after opening it.
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2011-12-15 14:45:36 +00:00
|
|
|
!assert {model: hr.job, id: job_developer, string: Job position is in 'open' state and no_of_recruitment = 0}:
|
2011-11-25 04:52:11 +00:00
|
|
|
- state == 'open'
|
|
|
|
- no_of_recruitment == 0
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2013-05-15 13:26:25 +00:00
|
|
|
Now, Recruitment is started so I start recruitment of Job Postion of "Developer" Profile.
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
|
|
|
!python {model: hr.job}: |
|
2013-05-15 13:26:25 +00:00
|
|
|
self.job_recruitment(cr, uid, [ref('job_developer')])
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2011-11-25 04:52:11 +00:00
|
|
|
I check 'state' and number of 'Expected in Recruitment' after initiating the recruitment
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2011-12-15 14:45:36 +00:00
|
|
|
!assert {model: hr.job, id: job_developer, string: Job position is in 'recruit' state and no_of_recruitment = 1.0}:
|
2011-11-15 10:30:28 +00:00
|
|
|
- state == 'recruit'
|
|
|
|
- no_of_recruitment == 1.0
|
2011-11-25 04:52:11 +00:00
|
|
|
-
|
|
|
|
I assign the job position to a newly hired employee
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
|
|
|
!python {model: hr.employee}: |
|
2011-12-22 13:38:14 +00:00
|
|
|
self.write(cr, uid, [ref('employee_niv')], {'job_id':ref('job_developer')})
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2012-06-11 09:34:23 +00:00
|
|
|
Now I dont want to recruit new employee for this position. so I mark it as Open.
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
|
|
|
!python {model: hr.job}: |
|
2012-06-11 09:34:23 +00:00
|
|
|
self.job_open(cr, uid, [ref('job_developer')])
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2011-11-28 05:13:22 +00:00
|
|
|
I check 'state' and number of 'Expected in Recruitment' after closing the Job position.
|
2011-11-15 10:30:28 +00:00
|
|
|
-
|
2012-06-11 09:34:23 +00:00
|
|
|
!assert {model: hr.job, id: job_developer, string: Job position is in 'open' state and no_of_recruitment = 0}:
|
|
|
|
- state == 'open'
|
2011-11-28 05:46:05 +00:00
|
|
|
- no_of_recruitment == 0
|