From b430036c7f516a9215f00ca55f64360b29cb07fd Mon Sep 17 00:00:00 2001 From: "Pinakin Nayi (OpenERP)" Date: Fri, 31 May 2013 17:17:16 +0530 Subject: [PATCH] [FIX]crm : delete with super user to avoid access rules because if there is any user (not have delete access of lead) than also merge opportunity bzr revid: pna@tinyerp.com-20130531114716-5as9flbu2506reh0 --- addons/crm/crm_lead.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index f8d7c2b..a974825 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -674,7 +674,8 @@ class crm_lead(base_stage, format_address, osv.osv): # Write merged data into first opportunity self.write(cr, uid, [highest.id], merged_data, context=context) # Delete tail opportunities - self.unlink(cr, uid, [x.id for x in tail_opportunities], context=context) + # Delete with super user to avoid access rights issues + self.unlink(cr, SUPERUSER_ID, [x.id for x in tail_opportunities], context=context) return highest.id -- 1.7.10.4