diff options
| author | Christophe Matthieu <chm@openerp.com> | 2012-11-30 14:43:56 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2012-11-30 14:43:56 +0100 |
| commit | 8d41ea91d8ff99ac8b36ceee4a56e4c1fdecf634 (patch) | |
| tree | 4d17214e0b7aea198544b9482255a934a6bdbea5 | |
| parent | f12df4e8ead8bd010fa29c205a557e42fdf07246 (diff) | |
[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
| -rw-r--r-- | addons/mail/mail_message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 3273870f5e0..a0d1f6105d2 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -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 |
