From e7c37772316165fbe918af5e4bed17ca2e66fc86 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Thu, 15 May 2008 08:11:19 +0000
Subject: [PATCH] Initialize source_section and destination_section.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20974 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_crm/Entity_addEvent.xml            | 9 ++++++++-
 bt5/erp5_crm/bt/revision                                 | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_addEvent.xml b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_addEvent.xml
index 23110f3643..5d4889ff22 100644
--- a/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_addEvent.xml
+++ b/bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/Entity_addEvent.xml
@@ -83,10 +83,14 @@ destination = context.getRelativeUrl()\n
 \n
 if direction == \'out\':\n
   source_url = source\n
+  source_section_url = person.getSubordination()\n
   destination_url = destination\n
+  destination_section_url = context.getSubordination()\n
 elif direction == \'in\':\n
   source_url = destination\n
+  source_section_url = context.getSubordination()\n
   destination_url = source\n
+  destination_section_url = person.getSubordination()\n
 else:\n
   raise KeyError, \'Direction Specified not handling: %s\' % direction\n
 \n
@@ -95,7 +99,9 @@ event_kw[\'portal_type\'] = portal_type\n
 event_kw[\'title\'] = title\n
 event_kw[\'resource\'] = resource\n
 event_kw[\'source\'] = source_url\n
+event_kw[\'source_section\'] = source_section_url\n
 event_kw[\'destination\'] = destination_url\n
+event_kw[\'destination_section\'] = destination_section_url\n
 event_kw[\'follow_up\'] = follow_up_url\n
 event_kw[\'start_date\'] = start_date\n
 event_kw[\'stop_date\'] = stop_date\n
@@ -105,7 +111,6 @@ event_kw[\'causality\'] = causality\n
 module = context.getDefaultModule(portal_type=portal_type)\n
 event = module.newContent(**event_kw)\n
 \n
-\n
 N_ = context.Base_translateString\n
 message = N_(\'New Event Created\')\n
 \n
@@ -179,7 +184,9 @@ event.Base_redirect(keep_items={\'portal_status_message\': message})\n
                             <string>causality</string>
                             <string>destination</string>
                             <string>source_url</string>
+                            <string>source_section_url</string>
                             <string>destination_url</string>
+                            <string>destination_section_url</string>
                             <string>KeyError</string>
                             <string>event_kw</string>
                             <string>_write_</string>
diff --git a/bt5/erp5_crm/bt/revision b/bt5/erp5_crm/bt/revision
index 37c3b662e1..20ad60520b 100644
--- a/bt5/erp5_crm/bt/revision
+++ b/bt5/erp5_crm/bt/revision
@@ -1 +1 @@
-227
\ No newline at end of file
+230
\ No newline at end of file
-- 
2.30.9