Commit 516a3c85 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_hr: add more value for position application

parent f310e4cf
...@@ -28,6 +28,10 @@ position_application = context.position_application_module.newContent( ...@@ -28,6 +28,10 @@ position_application = context.position_application_module.newContent(
destination_section=destination_section, destination_section=destination_section,
follow_up=position, follow_up=position,
aggregate=position_announcement, aggregate=position_announcement,
start_date = web_message_date,
end_date = DateTime(),
title = "Application " + first_name + " " + last_name,
reference = "NXD-Recruiting.Application." + first_name + "." + last_name.replace(" ", "."),
source=source, source=source,
source_decision=source_decision, source_decision=source_decision,
source_trade_list=source_trade_list) source_trade_list=source_trade_list)
...@@ -51,16 +55,21 @@ if web_message_date or web_message_text or web_message_title: ...@@ -51,16 +55,21 @@ if web_message_date or web_message_text or web_message_title:
source_value=context.ERP5Site_getAuthenticatedMemberPersonValue(), source_value=context.ERP5Site_getAuthenticatedMemberPersonValue(),
destination_value=requester, destination_value=requester,
title='Re: %s' % web_message_title, title='Re: %s' % web_message_title,
start_date=addToDate(web_message_date,to_add={'minute': 1}), #start_date=addToDate(web_message_date,to_add={'minute': 1}),
start_date=DateTime(),
causality_value=event, causality_value=event,
follow_up_value=position_application, follow_up_value=position_application,
content_type='Mail Message') #content_type='Mail Message',
content_type='text/plain'
)
response.Event_setTextContentFromNotificationMessage( response.Event_setTextContentFromNotificationMessage(
reference=response_template, reference=response_template,
substitution_method_parameter_dict=dict(mapping_dict = {'reply_body': event.getReplyBody(), substitution_method_parameter_dict=dict(mapping_dict = {'reply_body': event.getReplyBody(),
'reply_subject': event.getReplySubject(), 'reply_subject': event.getReplySubject(),
'sender_name': context.ERP5Site_getAuthenticatedMemberPersonValue().getTitle(), 'sender_name': context.ERP5Site_getAuthenticatedMemberPersonValue().getTitle(),
'recipient_first_name': first_name, 'recipient_first_name': first_name,
'recipient_last_name': last_name,
'source_event_start_date': web_message_date,
'position_title':context.restrictedTraverse(position).getTitle() 'position_title':context.restrictedTraverse(position).getTitle()
})) }))
...@@ -78,12 +87,18 @@ for line in listbox: ...@@ -78,12 +87,18 @@ for line in listbox:
document = context.Base_contribute(**document_kw) document = context.Base_contribute(**document_kw)
content_information = document.getContentInformation() content_information = document.getContentInformation()
creator = content_information.pop('Creator', content_information.pop('Generator', None)) creator = content_information.pop('Creator', content_information.pop('Generator', None))
description=line['document_type'] document_type = line['document_type']
description=document_type
if creator: if creator:
description += ', Generated by %s' % creator description += ', Generated by %s' % creator
title = document_type + "." + first_name + "." + last_name
reference = "NXD-Recruiting." + title.replace(" ", ".").replace("/", ".")
document.edit( document.edit(
follow_up_value_list = [requester,position_application], follow_up_value_list = [requester,position_application],
description = description) description = description,
title = title,
reference = reference,
group_list = ['nexedi'])
if batch: if batch:
return position_application return position_application
......
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