From eedcd359d95ebd2b847266612b9569e0256fd592 Mon Sep 17 00:00:00 2001 From: "Khushboo Bhatt (Open ERP)" Date: Mon, 5 Nov 2012 18:51:08 +0530 Subject: [PATCH] [IMP]crm:duplicated lead with new stage bzr revid: kbh@tinyerp.com-20121105132108-3n12ike042a1x7ph --- addons/crm/crm_lead.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 5ab68860874..2fed24636f8 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -118,6 +118,15 @@ class crm_lead(base_stage, format_address, osv.osv): 'stage_id': _read_group_stage_ids } + def copy(self, cr, uid, id, default=None, context=None): + if not default: + default = {} + stage_id = self.pool.get('crm.lead').browse(cr, uid, uid, context=context).stage_id.id + default.update({ + 'stage_id': stage_id, + }) + return super(crm_lead, self).copy(cr, uid, id, default, context=context) + def _compute_day(self, cr, uid, ids, fields, args, context=None): """ @param cr: the current row, from the database cursor,