[IMP] give answers of que
bzr revid: tpa@tinyerp.com-20111202071843-zmng1lv1fasfa95h
This commit is contained in:
parent
cfdc867c09
commit
8bd419b7b4
|
@ -1,15 +1,13 @@
|
|||
-
|
||||
In order to test hr evaluation plan.
|
||||
-
|
||||
I set the survey in open state.
|
||||
I set the "Employee Evaluation" in open state.
|
||||
-
|
||||
!python {model: survey}: |
|
||||
self.survey_open(cr, uid, [ref("survey_2")], context)
|
||||
self.survey_open(cr, uid, [ref("survey_2")], context)
|
||||
-
|
||||
I check that state of survey is Open.
|
||||
I check that state of "Employee Evaluation" is Open.
|
||||
-
|
||||
!assert {model: survey, id: survey_2, severity: error, string: Survey should be in OPen state}:
|
||||
- state == 'open'
|
||||
- state == 'open'
|
||||
-
|
||||
I start the evaluation process by click on "Start Evaluation" button.
|
||||
-
|
||||
|
@ -19,21 +17,49 @@
|
|||
I check that state is open.
|
||||
-
|
||||
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be in open state}:
|
||||
- state == 'wait'
|
||||
- state == 'wait'
|
||||
-
|
||||
I find a mistake on evaluation form. So I cancel the evaluation and again start it.
|
||||
-
|
||||
!python {model: hr_evaluation.evaluation}: |
|
||||
self.button_cancel(cr, uid, [ref('hr_evaluation_evaluation_0')])
|
||||
self.button_draft(cr, uid, [ref('hr_evaluation_evaluation_0')])
|
||||
self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
|
||||
self.button_cancel(cr, uid, [ref('hr_evaluation_evaluation_0')])
|
||||
self.button_draft(cr, uid, [ref('hr_evaluation_evaluation_0')])
|
||||
self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')])
|
||||
-
|
||||
I check that state is open.
|
||||
-
|
||||
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be in open state}:
|
||||
- state == 'wait'
|
||||
- state == 'wait'
|
||||
-
|
||||
I close this survey request by giving answer of survey question.
|
||||
I create a record for Survey Request.
|
||||
-
|
||||
!record {model: survey.request, id: survey_request_1}:
|
||||
survey_id: survey_2
|
||||
user_id: base.user_demo
|
||||
state: draft
|
||||
-
|
||||
I Create a record for interview evaluation.
|
||||
-
|
||||
!record {model: hr.evaluation.interview, id: evaluation_interview_0}:
|
||||
evaluation_id: hr_evaluation_evaluation_0
|
||||
request_id: survey_request_1
|
||||
-
|
||||
Give answer of the first page in "Employee Evaluation".
|
||||
-
|
||||
!python {model: survey.question.wiz}: |
|
||||
ctx = {'active_model':'hr.evaluation.interview', 'active_id': ref('evaluation_interview_0'), 'active_ids': [ref('evaluation_interview_0')], 'survey_id': ref("survey_2")}
|
||||
name_wiz_obj=self.pool.get('survey.name.wiz')
|
||||
name_id = name_wiz_obj.create(cr, uid, {'survey_id': ref("survey_2")})
|
||||
ctx ["sur_name_id"] = name_id
|
||||
self.create(cr, uid, {str(ref("survey_question_2")) +"_" +str(ref("survey_answer_1")) + "_multi" :'tpa',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_10")) + "_multi" :'application eng',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_20")) + "_multi" :'3',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_25")) + "_multi" :'2011-12-02 16:42:00',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_43")) + "_multi" :'HR',
|
||||
str(ref("survey_question_2")) +"_" +str(ref("survey_answer_98")) + "_multi" :'tpa review'
|
||||
}, context = ctx)
|
||||
-
|
||||
I close this Evaluation by giving answer of questions.
|
||||
-
|
||||
!python {model: hr_evaluation.evaluation}: |
|
||||
evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0'))
|
||||
|
@ -72,4 +98,13 @@
|
|||
I check that state of Evaluation is done.
|
||||
-
|
||||
!assert {model: hr_evaluation.evaluation, id: hr_evaluation_evaluation_0, severity: error, string: Evaluation should be in pending state}:
|
||||
- state == 'done'
|
||||
- state == 'done'
|
||||
-
|
||||
Print Evaluations Statistics Report
|
||||
-
|
||||
!python {model: hr.evaluation.report}: |
|
||||
import netsvc, tools, os, time
|
||||
ctx={}
|
||||
data_dict={'state': 'done', 'rating': 2, 'employee_id': ref("hr.employee1")}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'hr_evaluation_evaluation_0',wiz_data=data_dict, context=ctx, our_module='hr_evaluation')
|
Loading…
Reference in New Issue