[IMP]crm:duplicated lead with new stage

bzr revid: kbh@tinyerp.com-20121105132108-3n12ike042a1x7ph
This commit is contained in:
Khushboo Bhatt (Open ERP) 2012-11-05 18:51:08 +05:30
parent 11de2fbeef
commit eedcd359d9
1 changed files with 9 additions and 0 deletions

View File

@ -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,