[FIX] survey, hr_recruitment: data and test with survey_token
bzr revid: chm@openerp.com-20130301152342-q70taf73qolcyx7x
This commit is contained in:
@@ -85,10 +85,11 @@
|
||||
<record id="survey_job_0" model="survey">
|
||||
<field name="title">Job Survey</field>
|
||||
<field name="max_response_limit">20</field>
|
||||
<field eval="[(6,0,[])]" name="users"/>
|
||||
<field name="type" ref="survey.survey_type1"/>
|
||||
<field name="responsible_id" ref="base.user_root"/>
|
||||
<field name="response_user">5</field>
|
||||
<field name="max_response_limit">15</field>
|
||||
<field name="state">open</field>
|
||||
<field name="sign_in">1</field>
|
||||
</record>
|
||||
<record id="survey_page_job_0" model="survey.page">
|
||||
<field name="title">Default Section</field>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user