From 4082aa5d2ff1a0b9540690ed6024717b0af9eac9 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 24 Dec 2015 15:24:55 +0100
Subject: [PATCH] fixup! fixup! base: do not store a generated email message
 payload in a Mail Message document.

---
 .../portal_skins/erp5_crm/Event_isTextContentEditable.xml     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_isTextContentEditable.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_isTextContentEditable.xml
index 8f59fb3b70..4d7901af1c 100644
--- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_isTextContentEditable.xml
+++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Event_isTextContentEditable.xml
@@ -58,7 +58,9 @@
   of the Event, the event is considered as frozen and can not \n
   be modified.\n
 """\n
-return getattr(context, \'hasFile\', None) is not None and not context.hasFile()\n
+return getattr(context, \'hasFile\', None) is not None and not context.hasFile() \\\n
+  and (context.getPortalType() != \'Mail Message\' \\\n
+       or context.getSimulationState() not in (\'started\', \'stopped\', \'delivered\'))\n
 </string> </value>
         </item>
         <item>
-- 
2.30.9