[FIX]crm : delete with super user to avoid access rules because if there is any user...
authorPinakin Nayi (OpenERP) <pna@tinyerp.com>
Fri, 31 May 2013 11:47:16 +0000 (17:17 +0530)
committerPinakin Nayi (OpenERP) <pna@tinyerp.com>
Fri, 31 May 2013 11:47:16 +0000 (17:17 +0530)
bzr revid: pna@tinyerp.com-20130531114716-5as9flbu2506reh0

addons/crm/crm_lead.py

index f8d7c2b..a974825 100644 (file)
@@ -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