From 2831d94c207be72b6d014353c048e145ad8ed595 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 18 Nov 2015 13:41:17 +0100 Subject: [PATCH] [FIX] survey: no attachment in shared survey When sharing a survey, a mail.mail is created but the attachment were lost. This is due to a missing command (6, _, ids) when creating records in attachment_ids field (many2many). Fixes #9364, opw 656742 --- addons/survey/wizard/survey_email_compose_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/wizard/survey_email_compose_message.py b/addons/survey/wizard/survey_email_compose_message.py index 516c18af799..a9a244f1138 100644 --- a/addons/survey/wizard/survey_email_compose_message.py +++ b/addons/survey/wizard/survey_email_compose_message.py @@ -154,7 +154,7 @@ class survey_mail_compose_message(osv.TransientModel): 'parent_id': None, 'partner_ids': partner_id and [(4, partner_id)] or None, 'notified_partner_ids': partner_id and [(4, partner_id)] or None, - 'attachment_ids': wizard.attachment_ids or None, + 'attachment_ids': wizard.attachment_ids and [(6, 0, wizard.attachment_ids.ids)] or None, 'email_from': wizard.email_from or None, 'email_to': email, }