[FIX] mail: Get attachment of a message with a SUPPERUSER_ID when the user can access to the message
bzr revid: chm@openerp.com-20121130134356-vbukzwgk2mj9dq51
This commit is contained in:
@@ -250,7 +250,7 @@ class mail_message(osv.Model):
|
||||
partner_tree = dict((partner[0], partner) for partner in partners)
|
||||
|
||||
# 2. Attachments
|
||||
attachments = ir_attachment_obj.read(cr, uid, list(attachment_ids), ['id', 'datas_fname'], context=context)
|
||||
attachments = ir_attachment_obj.read(cr, SUPERUSER_ID, list(attachment_ids), ['id', 'datas_fname'], context=context)
|
||||
attachments_tree = dict((attachment['id'], {'id': attachment['id'], 'filename': attachment['datas_fname']}) for attachment in attachments)
|
||||
|
||||
# 3. Update message dictionaries
|
||||
|
||||
Reference in New Issue
Block a user