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