Commit fc54fbaa authored by Gabriel Monnerat's avatar Gabriel Monnerat

Refactor code to be possible set a specific sender of the event

parent af770895
......@@ -67,9 +67,9 @@ portal_entity_type_list = portal.getPortalEntityTypeList()\n
logged_in_user_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
start_date = DateTime()\n
\n
person = None\n
person = source\n
organisation = None\n
if logged_in_user_value is not None:\n
if logged_in_user_value is not None and person is None:\n
person = logged_in_user_value.getRelativeUrl()\n
organisation = logged_in_user_value.getSubordination()\n
\n
......@@ -139,7 +139,7 @@ event.Base_redirect(keep_items={\'portal_status_message\': message})\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>title, direction, portal_type, resource, text_content=None, notification_message=None, batch_mode=False, keep_draft=False, follow_up=None, **kw</string> </value>
<value> <string>title, direction, portal_type, resource, text_content=None, notification_message=None, batch_mode=False, keep_draft=False, follow_up=None, source=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -78,10 +78,8 @@ event = context.Base_addEvent(title=\'\',\n
notification_message=resource_reference,\n
keep_draft=keep_draft,\n
follow_up=follow_up,\n
source=source,\n
batch_mode=True)\n
\n
if event.getSource() is None:\n
event.setSource(source)\n
</string> </value>
</item>
<item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment