2 In order to test hr_evaluation module for OpenERP, I will create plan then create evaluation under that plan.
5 I create new Department.
7 !record {model: hr.department, id: hr_department_rd0}:
8 manager_id: base.user_root
11 I create a new employee.
13 !record {model: hr.employee, id: hr_employee_employee0}:
14 address_home_id: base.res_partner_address_1
15 company_id: base.main_company
17 marital: hr.hr_employee_marital_status_single
19 user_id: base.user_root
20 department_id: 'hr_department_rd0'
22 I create another new employee and assign first one as it's Manager.
24 !record {model: hr.employee, id: hr_employee_employee1}:
25 address_home_id: base.res_partner_address_3000
26 company_id: base.main_company
29 user_id: base.user_demo
30 parent_id: 'hr_employee_employee0'
33 I Create an "Employee Evaluation" survey for Manager's Evaluation Plan.
35 !record {model: 'survey', id: survey_0}:
36 title: 'Employee Evaluation'
37 max_response_limit: 20
40 I Create an "Employee Evaluation" page in "Employee Evaluation" survey.
42 !record {model: 'survey.page', id: survey_employee_page_0}:
43 title: 'Employee Evaluation'
46 I Create "What is your Name" question in "Employee Evaluation" survey page.
48 !record {model: 'survey.question', id: survey_p_question_0}:
49 question: 'What is your Name?'
50 type: 'single_textbox'
52 page_id: survey_employee_page_0
54 I Create "What is your gender" Question in "Employee Evaluation" survey page.
56 !record {model: 'survey.question', id: survey_p_question_1}:
57 question: 'What is your gender?'
58 type: multiple_choice_only_one_ans
60 is_require_answer: true
61 page_id: survey_employee_page_0
63 I Create "Male" answer in question "What is your gender?"
65 !record {model: 'survey.answer', id: survey_p_1_1}:
68 question_id : survey_p_question_1
70 I Create "Female" answer in question "What is your gender?"
72 !record {model: 'survey.answer', id: survey_p_1_2}:
75 question_id : survey_p_question_1
78 I set the survey in open state.
80 !python {model: survey}: |
81 self.survey_open(cr, uid, [ref("survey_0")], context)
84 I create an Evaluation plan and select "Employee Evaluation" survey for "Send to Subordinates" and "Final interview with Manager" Phase.
86 !record {model: hr_evaluation.plan, id: hr_evaluation_plan_managersplan0}:
87 company_id: base.main_company
93 name: Send to Subordinates
96 name: Final Interview with manager
101 I create an Evaluation for employee under "Manager Evaluation Plan".
103 !record {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
105 employee_id: 'hr_employee_employee1'
106 plan_id: 'hr_evaluation_plan_managersplan0'
110 I create an Interview Request record
112 !record {model: hr.evaluation.interview, id: hr_evaluation_interview_0}:
113 date_deadline: '2010-06-28'
114 evaluation_id: 'hr_evaluation_evaluation_0'
115 survey_id: hr_evaluation.survey_0
117 I check that evaluation is in "Draft" state.
119 !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
122 I start the evaluation process by click on "Start Evaluation" button.
124 !python {model: hr_evaluation.evaluation}: |
125 self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
128 I close this servey request by giving answer of survey question.
130 !python {model: hr.evaluation.interview}: |
131 self.survey_req_done(cr, uid, [ref('hr_evaluation_interview_0')])
133 I click on "Final Validation" button to finalise evaluation.
135 !python {model: hr_evaluation.evaluation}: |
136 self.button_final_validation(cr, uid, [ref("hr_evaluation.hr_evaluation_evaluation_0")],
137 {"active_ids": [ref("hr_evaluation.menu_open_view_hr_evaluation_tree")]})
140 I check that state is "Final Validation".
142 !assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0}:
143 - state == 'progress'
145 Give Rating "Meet expectations" by selecting overall Rating.
147 !record {model: hr_evaluation.evaluation, id: hr_evaluation.hr_evaluation_evaluation_0}:
151 I close this Evaluation by click on "Done" button of this wizard.
153 !python {model: hr_evaluation.evaluation}: |
154 self.button_done(cr, uid, [ref("hr_evaluation.hr_evaluation_evaluation_0")], {"active_ids": [ref("hr_evaluation.menu_open_view_hr_evaluation_tree")]})