Merge pull request #2640 from anandpdoshi/anand-jan-27

Fixes to Error Reports
This commit is contained in:
Anand Doshi 2015-01-27 14:33:12 +05:30
commit e0b39b860f
2 changed files with 8 additions and 5 deletions

View File

@ -8,19 +8,22 @@ frappe.query_reports["Customer Acquisition and Loyalty"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("company"),
"reqd": 1
},
{
"fieldname":"from_date",
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date")
"default": frappe.defaults.get_user_default("year_start_date"),
"reqd": 1
},
{
"fieldname":"to_date",
"label": __("To Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_end_date")
"default": frappe.defaults.get_user_default("year_end_date"),
"reqd": 1
},
]
}
}

View File

@ -166,4 +166,4 @@ def item_details(doctype, txt, searchfield, start, page_len, filters):
and %s like "%s" %s
limit %s, %s """ % ("%s", searchfield, "%s",
get_match_cond(doctype), "%s", "%s"),
(filters["delivery_note"], "%%%s%%" % txt, start, page_len))
((filters or {}).get("delivery_note"), "%%%s%%" % txt, start, page_len))