added automated_messages from communications to activites
This commit is contained in:
parent
65f6692a12
commit
ac8650d486
@ -129,6 +129,25 @@ def get_deal_activities(name):
|
||||
}
|
||||
activities.append(activity)
|
||||
|
||||
for communication in docinfo.automated_messages:
|
||||
activity = {
|
||||
"activity_type": "communication",
|
||||
"creation": communication.creation,
|
||||
"data": {
|
||||
"subject": communication.subject,
|
||||
"content": communication.content,
|
||||
"sender_full_name": communication.sender_full_name,
|
||||
"sender": communication.sender,
|
||||
"recipients": communication.recipients,
|
||||
"cc": communication.cc,
|
||||
"bcc": communication.bcc,
|
||||
"attachments": get_attachments('Communication', communication.name),
|
||||
"read_by_recipient": communication.read_by_recipient,
|
||||
},
|
||||
"is_lead": False,
|
||||
}
|
||||
activities.append(activity)
|
||||
|
||||
calls = calls + get_linked_calls(name)
|
||||
notes = notes + get_linked_notes(name)
|
||||
tasks = tasks + get_linked_tasks(name)
|
||||
@ -241,6 +260,25 @@ def get_lead_activities(name):
|
||||
}
|
||||
activities.append(activity)
|
||||
|
||||
for communication in docinfo.automated_messages:
|
||||
activity = {
|
||||
"activity_type": "communication",
|
||||
"creation": communication.creation,
|
||||
"data": {
|
||||
"subject": communication.subject,
|
||||
"content": communication.content,
|
||||
"sender_full_name": communication.sender_full_name,
|
||||
"sender": communication.sender,
|
||||
"recipients": communication.recipients,
|
||||
"cc": communication.cc,
|
||||
"bcc": communication.bcc,
|
||||
"attachments": get_attachments('Communication', communication.name),
|
||||
"read_by_recipient": communication.read_by_recipient,
|
||||
},
|
||||
"is_lead": True,
|
||||
}
|
||||
activities.append(activity)
|
||||
|
||||
calls = get_linked_calls(name)
|
||||
notes = get_linked_notes(name)
|
||||
tasks = get_linked_tasks(name)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user