From 81e7de3e482a7a2bab0bdeeb0c6338441f01febb Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 28 Feb 2013 17:06:24 +0100 Subject: [PATCH 1/2] [IMP] mail: fullmail default_attachment_ids is a list of ids bzr revid: chm@openerp.com-20130228160624-0wmeuecjot17sa27 --- addons/mail/static/src/js/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 0872d049162..fe9d8f45568 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -518,7 +518,7 @@ openerp.mail = function (session) { 'default_composition_mode': default_composition_mode, 'default_parent_id': self.id, 'default_body': mail.ChatterUtils.get_text2html(self.$el ? (self.$el.find('textarea:not(.oe_compact)').val() || '') : ''), - 'default_attachment_ids': self.attachment_ids, + 'default_attachment_ids': _.map(this.attachment_ids, function (file) {return file.id;}), 'default_partner_ids': partner_ids, }; if (default_composition_mode != 'reply' && self.context.default_model && self.context.default_res_id) { From 35f40a8e6403ec46de70220500ea0f4205b97868 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 28 Feb 2013 17:11:53 +0100 Subject: [PATCH 2/2] [FIX] mail: this.attachment_ids to self.attachment_ids bzr revid: chm@openerp.com-20130228161153-74ialj6rgay2gwj9 --- addons/mail/static/src/js/mail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index fe9d8f45568..e5c8f40eb2e 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -518,7 +518,7 @@ openerp.mail = function (session) { 'default_composition_mode': default_composition_mode, 'default_parent_id': self.id, 'default_body': mail.ChatterUtils.get_text2html(self.$el ? (self.$el.find('textarea:not(.oe_compact)').val() || '') : ''), - 'default_attachment_ids': _.map(this.attachment_ids, function (file) {return file.id;}), + 'default_attachment_ids': _.map(self.attachment_ids, function (file) {return file.id;}), 'default_partner_ids': partner_ids, }; if (default_composition_mode != 'reply' && self.context.default_model && self.context.default_res_id) {