2 Give the access rights of Hr Officer to the user to test the process of Human Resource Management.
5 uid: 'res_users_hr_officer'
7 In order to test the process of Human Resource Management, I open Job Postion for "Developer".
9 !python {model: hr.job}: |
10 self.job_open(cr, uid, [ref('job_developer')])
12 I check state of Job Position after opening it.
14 !assert {model: hr.job, id: job_developer, string: Job position is in 'open' state and no_of_recruitment = 0}:
16 - no_of_recruitment == 0
18 Now, Recruitement is started so I start recruitement of Job Postion of "Developer" Profile.
20 !python {model: hr.job}: |
21 self.job_recruitement(cr, uid, [ref('job_developer')])
23 I check 'state' and number of 'Expected in Recruitment' after initiating the recruitment
25 !assert {model: hr.job, id: job_developer, string: Job position is in 'recruit' state and no_of_recruitment = 1.0}:
27 - no_of_recruitment == 1.0
29 I assign the job position to a newly hired employee
31 !python {model: hr.employee}: |
32 self.write(cr, uid, [ref('employee_niv')], {'job_id':ref('job_developer')})
34 Now I dont want to recruit new employee for this position. so I mark it as Open.
36 !python {model: hr.job}: |
37 self.job_open(cr, uid, [ref('job_developer')])
39 I check 'state' and number of 'Expected in Recruitment' after closing the Job position.
41 !assert {model: hr.job, id: job_developer, string: Job position is in 'open' state and no_of_recruitment = 0}:
43 - no_of_recruitment == 0