[REM] Removed attachment removal because garbage collecting will do it.
authorThibault Delavallée <tde@openerp.com>
Wed, 6 Mar 2013 16:05:17 +0000 (17:05 +0100)
committerThibault Delavallée <tde@openerp.com>
Wed, 6 Mar 2013 16:05:17 +0000 (17:05 +0100)
bzr revid: tde@openerp.com-20130306160517-b0rdbait2h6c9c77

addons/mail/wizard/mail_compose_message.py

index c946a71..f4b7eb8 100644 (file)
@@ -222,10 +222,6 @@ class mail_compose_message(osv.TransientModel):
                 subtype = 'mail.mt_comment' if not context.get('mail_compose_log', False) else False
                 active_model_pool.message_post(cr, uid, [res_id], type='comment', subtype=subtype, context=context, **post_values)
 
-            # mass mailing: delete mail.compose.message attachments, added by the user and that have been duplicated
-            if wizard.attachment_ids:
-                ir_attachment_obj.unlink(cr, uid, [attach.id for attach in wizard.attachment_ids if attach.res_model == self._name], context=context)
-
         return {'type': 'ir.actions.act_window_close'}
 
     def render_message(self, cr, uid, wizard, res_id, context=None):