From 8147f74e4ef37226784f81e6819d9a4459c5f452 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Jan 2015 13:16:18 +0530 Subject: [PATCH 1/2] [minor] Mandatory filters in Customer Acquisition and Loyalty --- .../customer_acquisition_and_loyalty.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js index ce19f519b96..5e744319787 100644 --- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js +++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js @@ -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 }, ] -} \ No newline at end of file +} From 6f701b3b6a01367390e4bdae42180cc1aa71f3cb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Jan 2015 13:18:01 +0530 Subject: [PATCH 2/2] [minor] Packing Slip get_query --- erpnext/stock/doctype/packing_slip/packing_slip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index bd79835d58a..1916cef242b 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -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))