Browse Source

[fix] communications in user, fixes frappe/erpnext#8459

version-14
Rushabh Mehta 8 years ago
parent
commit
15d97471fe
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      frappe/desk/form/load.py

+ 3
- 0
frappe/desk/form/load.py View File

@@ -172,6 +172,9 @@ def get_communication_data(doctype, name, start=0, limit=20, after=None, fields=
# find after a particular date # find after a particular date
conditions+= ' and creation > {0}'.format(after) conditions+= ' and creation > {0}'.format(after)


if doctype=='User':
conditions+= ' and not (reference_doctype="User" and communication_type="Communication")'

communications = frappe.db.sql("""select {fields} communications = frappe.db.sql("""select {fields}
from tabCommunication from tabCommunication
where {conditions} {group_by} where {conditions} {group_by}


Loading…
Cancel
Save