This is based on the auto_delete flag on mail.mail and the assumption that mail.mail records created without a parent message will be deleted as a whole, including the parent message and its attachments. This is contrasted with mail.mail records created for notifications regarding a mail.message, and therefore created with an existing `mail_message_id` parent. For this last case the parent must not be deleted along with the child mail.mail, as it exists on its own. bzr revid: odo@openerp.com-20120905151950-7jv6hi0x5fx5iytp