From 2074d194b98f26e4ec0f1e513009a3b8f888418c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 9 Apr 2010 08:29:58 +0200 Subject: [PATCH 1/2] fix bzr revid: fp@tinyerp.com-20100409062958-sv7hcparrvdk12rw --- addons/purchase_tender/__terp__.py | 2 +- addons/purchase_tender/purchase_tender.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/purchase_tender/__terp__.py b/addons/purchase_tender/__terp__.py index fb514e64bd0..a6b3543cbbb 100644 --- a/addons/purchase_tender/__terp__.py +++ b/addons/purchase_tender/__terp__.py @@ -28,7 +28,7 @@ When a purchase order is created, you now have the opportunity to save the related tender. This new object will regroup and will allow you to easily keep track and order all your purchase orders. """, - "depends" : ["purchase"], + "depends" : ["purchase","mrp"], "init_xml" : [], "demo_xml" : [], "update_xml" : ["purchase_tender_view.xml","security/ir.model.access.csv","purchase_tender_sequence.xml"], diff --git a/addons/purchase_tender/purchase_tender.py b/addons/purchase_tender/purchase_tender.py index 51c28e88d0c..db3bec835fd 100644 --- a/addons/purchase_tender/purchase_tender.py +++ b/addons/purchase_tender/purchase_tender.py @@ -94,7 +94,7 @@ class mrp_procurement(osv.osv): res = super(mrp_procurement, self).make_po(cr, uid, ids, context) for proc_id,po_id in res.items(): procurement = self.browse(cr, uid, proc_id) - if proc.product_id.purchase_tender: + if procurement.product_id.purchase_tender: self.pool.get('purchase.tender').create(cr, uid, { 'name': procurement.name, 'lines_ids': [(0,0,{ From 02a54db3a730f27d8aafdb08c82692ea845c5575 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Fri, 9 Apr 2010 12:03:01 +0530 Subject: [PATCH 2/2] [IMP] survey, hr_evalution, hr_recruitment: improvement bzr revid: hmo@tinyerp.com-20100409063301-q8qqxtt33jnxv378 --- addons/hr_evaluation/hr_evaluation.py | 45 ++++++ addons/hr_evaluation/hr_evaluation_view.xml | 8 +- addons/hr_recruitment/hr_recruitment.py | 137 +++++++++++++++++- addons/hr_recruitment/hr_recruitment_view.xml | 16 +- .../hr_recruitment/hr_recruitment_wizard.xml | 8 - .../wizard/hr_recruitment_wizard.py | 55 ------- addons/survey/survey.py | 40 +++++ addons/survey/survey_view.xml | 4 +- 8 files changed, 235 insertions(+), 78 deletions(-) diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index 1f3e960fb6e..590c1a9ad83 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -300,6 +300,51 @@ class hr_evaluation_interview(osv.osv): self.write(cr, uid, ids, { 'state' : 'cancel'}, context=context) return True + def action_print_survey(self, cr, uid, ids, context=None): + """ + If response is available then print this response otherwise print survey form(print template of the survey). + + @param self: The object pointer + @param cr: the current row, from the database cursor, + @param uid: the current user’s ID for security checks, + @param ids: List of Survey IDs + @param context: A standard dictionary for contextual values + @return : Dictionary value for print survey form. + """ + if not context: + context = {} + record = self.browse(cr, uid, ids, context) + record = record and record[0] + datas = {} + page_setting = {'orientation': 'vertical', 'without_pagebreak': 0, 'paper_size': 'letter', 'page_number': 1, 'survey_title': 1} + report = {} + if record: + datas['ids'] = [record.survey_id.id] + response_id = record.response.id + if response_id: + context.update({'survey_id': datas['ids'], 'response_id' : [response_id], 'response_no':0}) + datas['form'] = page_setting + datas['model'] = 'survey.print.answer' + report = { + 'type': 'ir.actions.report.xml', + 'report_name': 'survey.browse.response', + 'datas': datas, + 'nodestroy': True, + 'context' : context + } + else: + datas['form'] = page_setting + datas['model'] = 'survey.print' + report = { + 'type': 'ir.actions.report.xml', + 'report_name': 'survey.form', + 'datas': datas, + 'nodestroy':True, + 'context' : context + } + return report + + hr_evaluation_interview() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:1 diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index fa50f944fa1..d59ac82a661 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -261,8 +261,8 @@