浏览代码

[fix] for frappe/erpnext#8555

version-14
Rushabh Mehta 8 年前
父节点
当前提交
14c4796e05
共有 1 个文件被更改,包括 10 次插入6 次删除
  1. +10
    -6
      frappe/www/list.py

+ 10
- 6
frappe/www/list.py 查看文件

@@ -123,15 +123,19 @@ def get_list_context(context, doctype):
from frappe.website.doctype.web_form.web_form import get_web_form_list from frappe.website.doctype.web_form.web_form import get_web_form_list


list_context = context or frappe._dict() list_context = context or frappe._dict()
module = load_doctype_module(doctype)
if hasattr(module, "get_list_context"):
out = frappe._dict(module.get_list_context(list_context) or {})
if out:
list_context = out
meta = frappe.get_meta(doctype)

if not meta.custom:
# custom doctypes don't have modules
module = load_doctype_module(doctype)
if hasattr(module, "get_list_context"):
out = frappe._dict(module.get_list_context(list_context) or {})
if out:
list_context = out


# get path from '/templates/' folder of the doctype # get path from '/templates/' folder of the doctype
if not list_context.row_template: if not list_context.row_template:
list_context.row_template = frappe.get_meta(doctype).get_row_template()
list_context.row_template = meta.get_row_template()


# is web form, show the default web form filters # is web form, show the default web form filters
# which is only the owner # which is only the owner


正在加载...
取消
保存