[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
This commit is contained in:
parent
5b18695c45
commit
b430036c7f
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue