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