diff --git a/addons/crm_project_issue/project_issue.py b/addons/crm_project_issue/project_issue.py index 1b71ea74ba7..c9eaa965223 100644 --- a/addons/crm_project_issue/project_issue.py +++ b/addons/crm_project_issue/project_issue.py @@ -44,8 +44,8 @@ class crm_lead_to_project_issue_wizard(osv.TransientModel): issue = Issue.browse(cr, uid, issue_id, context=None) # move the mail thread Lead.message_change_thread(cr, uid, [lead.id], issue, context=context) - # delete the lead - Lead.unlink(cr, uid, [lead.id], context=None) + # Archive the lead + Lead.write(cr, uid, [lead.id], {'active': False}, context=context) # return the action to go to the form view of the new Issue view_id = self.pool['ir.model.data'].xmlid_to_res_id( cr, uid, 'project_issue.project_issue_form_view')