Merge lp:~serpent-consulting-services/openobject-addons/7.0-1171457-SerpentCS into lp:openobject-addons/7.0

Proposed by Serpent Consulting Services
Status: Rejected
Rejected by: Thibault Delavallée (OpenERP)
Proposed branch: lp:~serpent-consulting-services/openobject-addons/7.0-1171457-SerpentCS
Merge into: lp:openobject-addons/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
mail/mail_thread.py (+1/-1)
To merge this branch: bzr merge lp:~serpent-consulting-services/openobject-addons/7.0-1171457-SerpentCS
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+164548@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

Hello,

In mail_thread.message_post(), we want to attach manually added attachments (having mail.compose.message model) to the message's document (having in our case a False model). As we could have 'free' attachments in the 7.0 modeling of the communication, being able to write False as res_model is required.

The server fix has been merged into 7.0. This merge proposal is therefore not necessary anymore.

Best regards,

Unmerged revisions

9140. By Serpent Consulting Services

[FIX] mail : Unnecessary call to various server methods for an unsaved compose message

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_thread.py'
2--- mail/mail_thread.py 2013-05-08 10:23:04 +0000
3+++ mail/mail_thread.py 2013-05-17 22:01:24 +0000
4@@ -1048,7 +1048,7 @@
5 ('res_model', '=', 'mail.compose.message'),
6 ('create_uid', '=', uid),
7 ('id', 'in', attachment_ids)], context=context)
8- if filtered_attachment_ids:
9+ if filtered_attachment_ids and model and thread_id:
10 ir_attachment.write(cr, SUPERUSER_ID, filtered_attachment_ids, {'res_model': model, 'res_id': thread_id}, context=context)
11 attachment_ids = [(4, id) for id in attachment_ids]
12 # Handle attachments parameter, that is a dictionary of attachments