From 0c44d4c9a7b3b612ec98e1b0b3f26aacec07bfd5 Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Tue, 22 May 2012 15:25:32 +0530 Subject: [PATCH] [IMP] hr_recruitment:improve job position bzr revid: pna@tinyerp.com-20120522095532-7xbgeci6eatv3r5p --- addons/hr_recruitment/hr_recruitment.py | 18 +++++++++++++----- addons/hr_recruitment/hr_recruitment_view.xml | 6 ++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index e03d0d1ab1e..05dd6852678 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -542,11 +542,19 @@ class hr_job(osv.osv): def action_print_survey(self, cr, uid, ids, context=None): if context is None: context = {} - for rec in self.browse(cr, uid, ids, context=context): - if rec.survey_id: - context.update({'survey_id': rec.survey_id.id, 'response_id': [0], 'response_no': 0,}) - value = self.pool.get("survey").action_print_survey(cr, uid, ids, context=context) - return value + datas = {} + record = self.browse(cr, uid, ids, context=context)[0] + if record.survey_id: + datas['ids'] = [record.survey_id.id] + datas['model'] = 'survey.print' + context.update({'response_id': [0], 'response_no': 0,}) + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'survey.form', + 'datas': datas, + 'context' : context, + 'nodestroy':True, + } hr_job() diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index c211c55d32e..82495e47f6b 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -352,11 +352,9 @@ form - - - -