Explorar el Código

[fix] add communication in comments, fixes frappe/erpnext#5450

version-14
Rushabh Mehta hace 9 años
padre
commit
9e008ce1ca
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. +3
    -2
      frappe/website/doctype/web_form/web_form.py
  2. +1
    -1
      frappe/website/utils.py

+ 3
- 2
frappe/website/doctype/web_form/web_form.py Ver fichero

@@ -111,7 +111,8 @@ class WebForm(WebsiteGenerator):
context.reference_name = context.doc.name

if self.allow_comments and frappe.form_dict.name:
context.comment_list = get_comment_list(context.doc.doctype, context.doc.name)
context.comment_list = get_comment_list(context.doc.doctype,
context.doc.name)

context.parents = self.get_parents(context)

@@ -257,7 +258,7 @@ def has_web_form_permission(doctype, name, ptype='read'):

else:
return False

def check_webform_perm(doctype, name):
doc = frappe.get_doc(doctype, name)


+ 1
- 1
frappe/website/utils.py Ver fichero

@@ -32,7 +32,7 @@ def get_comment_list(doctype, name):
communication_type='Comment'
and reference_doctype=%s
and reference_name=%s
and (comment_type is null or comment_type='Comment')
and (comment_type is null or comment_type in ('Comment', 'Communication'))
and modified >= DATE_SUB(NOW(),INTERVAL 1 YEAR)
order by creation""", (doctype, name), as_dict=1) or []



Cargando…
Cancelar
Guardar