From dc6fc7e97ffe933e63fa5b24e1b88141a32cb91e Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 1 Mar 2013 16:23:42 +0100 Subject: [PATCH] [FIX] survey, hr_recruitment: data and test with survey_token bzr revid: chm@openerp.com-20130301152342-q70taf73qolcyx7x --- addons/hr_recruitment/hr_recruitment_data.xml | 5 +++-- addons/hr_recruitment/test/recruitment_process.yml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment_data.xml b/addons/hr_recruitment/hr_recruitment_data.xml index a0b16f042bc..48c2de70216 100644 --- a/addons/hr_recruitment/hr_recruitment_data.xml +++ b/addons/hr_recruitment/hr_recruitment_data.xml @@ -85,10 +85,11 @@ Job Survey 20 - - 5 + 15 + open + 1 Default Section diff --git a/addons/hr_recruitment/test/recruitment_process.yml b/addons/hr_recruitment/test/recruitment_process.yml index f2d4e4736fa..d77b88ffde1 100644 --- a/addons/hr_recruitment/test/recruitment_process.yml +++ b/addons/hr_recruitment/test/recruitment_process.yml @@ -75,7 +75,8 @@ - !python {model: survey.question.wiz}: | ctx = context.copy() - ctx.update({'active_model': 'hr.applicant', 'active_id': ref("hr_case_programmer"), 'active_ids': [ref("hr_case_programmer")], 'survey_id': ref("survey_job_0")}) + applicant = self.pool.get('hr.applicant').browse(cr, uid, ref("hr_case_programmer"), context=context) + ctx.update({'survey_id': ref("survey_job_0"), 'survey_token': applicant.job_id.survey_id.token}) self.fields_view_get(cr, uid, ref("survey.view_survey_question_message"),"form", context=ctx) vals = self.default_get(cr, uid , [], context=ctx) self.create(cr, uid, vals, context=ctx)