瀏覽代碼

fix: reply emails get_reference_doc from communication issue

version-14
kamaljohnson 3 年之前
父節點
當前提交
12442726c6
共有 1 個檔案被更改,包括 12 行新增19 行删除
  1. +12
    -19
      frappe/email/receive.py

+ 12
- 19
frappe/email/receive.py 查看文件

@@ -624,25 +624,18 @@ class InboundMail(Email):

if self.parent_communication():
data['in_reply_to'] = self.parent_communication().name

if self.email_account.use_imap:
if self.append_to and self.append_to != 'Communication':
reference_doc = self._create_reference_document(self.append_to)
if reference_doc:
data['reference_doctype'] = reference_doc.doctype
data['reference_name'] = reference_doc.name
data['is_first'] = True
else:
if self.reference_document():
data['reference_doctype'] = self.reference_document().doctype
data['reference_name'] = self.reference_document().name
elif self.email_account.append_to and self.email_account.append_to != 'Communication':
reference_doc = self._create_reference_document(self.email_account.append_to)
# TODO: here instead of using email_account.append_to, the imap_folder.append_to should be used
if reference_doc:
data['reference_doctype'] = reference_doc.doctype
data['reference_name'] = reference_doc.name
data['is_first'] = True
append_to = self.append_to if self.email_account.use_imap else self.email_account.append_to

if self.reference_document():
data['reference_doctype'] = self.reference_document().doctype
data['reference_name'] = self.reference_document().name
elif append_to and append_to != 'Communication':
reference_doc = self._create_reference_document(append_to)
if reference_doc:
data['reference_doctype'] = reference_doc.doctype
data['reference_name'] = reference_doc.name
data['is_first'] = True

if self.is_notification():
# Disable notifications for notification.


Loading…
取消
儲存