From 7a740bc897b20e193590f7fc3b24a428049f4674 Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Fri, 23 Nov 2012 12:55:54 +0530 Subject: [PATCH] [IMP] hr_recruitment : Duplicating an existing Application should put it back into 'Initial Qualification' stage. bzr revid: mdi@tinyerp.com-20121123072554-y3lbrmgs23qri8bx --- addons/hr_recruitment/hr_recruitment.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index de1539da55a..bbc95749726 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -243,6 +243,12 @@ class hr_applicant(base_stage, osv.Model): 'stage_id': _read_group_stage_ids } + def copy(self, cr, uid, id, default=None, context=None): + if default is None: + default = {} + default.update({'stage_id': self._get_default_stage_id(cr, uid, context=context)}) + return super(hr_applicant, self).copy(cr, uid, id, default, context=context) + def onchange_job(self, cr, uid, ids, job, context=None): result = {}