refactor: handle Issue and Lead separately on Communication
This commit is contained in:
parent
8dd14c4ba8
commit
1456f42c68
1 changed files with 8 additions and 1 deletions
|
|
@ -668,7 +668,14 @@ def update_parent_document_on_communication(doc):
|
|||
options = (status_field.options or "").splitlines()
|
||||
|
||||
# if status has a "Open" option and status is "Replied", then update the status for received communication
|
||||
if ("Open" in options) and parent.status == "Replied" and doc.sent_or_received == "Received":
|
||||
if (
|
||||
("Open" in options)
|
||||
and parent.status == "Replied"
|
||||
and doc.sent_or_received == "Received"
|
||||
or (
|
||||
parent.doctype == "Issue" and ("Open" in options) and doc.sent_or_received == "Received"
|
||||
) # For 'Issue', current status is not considered.
|
||||
):
|
||||
parent.db_set("status", "Open")
|
||||
parent.run_method("handle_hold_time", "Replied")
|
||||
apply_assignment_rule(parent)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue