Merge pull request #23397 from deepeshgarg007/search_field_batch_query

feat: Show searchfields in batch query
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index e8fe62f..efd4944 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -165,9 +165,14 @@
 				AND company = %(company)s
 				AND account_currency = %(currency)s
 				AND `{searchfield}` LIKE %(txt)s
+				{mcond}
 			ORDER BY idx DESC, name
 			LIMIT %(offset)s, %(limit)s
-		""".format(account_type_condition=account_type_condition, searchfield=searchfield),
+		""".format(
+				account_type_condition=account_type_condition,
+				searchfield=searchfield,
+				mcond=get_match_cond(doctype)
+			),
 			dict(
 				account_types=filters.get("account_type"),
 				company=filters.get("company"),
diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py
index f8154f2..a033a2a 100644
--- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py
+++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py
@@ -72,10 +72,16 @@
 
 	def get_transactions(self, start_date, end_date, account_id=None):
 		self.auth()
-		account_ids = list(account_id) if account_id else None
+		kwargs = dict(
+			access_token=self.access_token,
+			start_date=start_date,
+			end_date=end_date
+		)
+		if account_id:
+			kwargs.update(dict(account_ids=[account_id]))
 
 		try:
-			response = self.client.Transactions.get(self.access_token, start_date=start_date, end_date=end_date, account_ids=account_ids)
+			response = self.client.Transactions.get(**kwargs)
 			transactions = response["transactions"]
 			while len(transactions) < response["total_transactions"]:
 				response = self.client.Transactions.get(self.access_token, start_date=start_date, end_date=end_date, offset=len(transactions))
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 9ce570e..a919b67 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -690,6 +690,7 @@
 erpnext.patches.v13_0.update_old_loans
 erpnext.patches.v12_0.set_serial_no_status #2020-05-21
 erpnext.patches.v12_0.update_price_list_currency_in_bom
+execute:frappe.reload_doctype('Dashboard')
 execute:frappe.delete_doc_if_exists('Dashboard', 'Accounts')
 erpnext.patches.v13_0.update_actual_start_and_end_date_in_wo
 erpnext.patches.v13_0.set_company_field_in_healthcare_doctypes #2020-05-25
diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js
index 2af9140..eb709e5 100644
--- a/erpnext/public/js/conf.js
+++ b/erpnext/public/js/conf.js
@@ -11,7 +11,9 @@
 	"Territory": "Selling",
 	"Sales Person": "Selling",
 	"Sales Partner": "Selling",
-	"Brand": "Stock"
+	"Brand": "Stock",
+	"Maintenance Schedule": "Support",
+	"Maintenance Visit": "Support"
 });
 
 $.extend(frappe.breadcrumbs.module_map, {
diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js
index 23700c9..2499c80 100644
--- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js
+++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js
@@ -9,13 +9,15 @@
 			"fieldtype": "Date",
 			"width": "80",
 			"default": frappe.sys_defaults.year_start_date,
+			"reqd": 1
 		},
 		{
 			"fieldname":"to_date",
 			"label": __("To Date"),
 			"fieldtype": "Date",
 			"width": "80",
-			"default": frappe.datetime.get_today()
+			"default": frappe.datetime.get_today(),
+			"reqd": 1
 		},
 		{
 			"fieldname": "item",
diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
index 2c95084..8f3e246 100644
--- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
+++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py
@@ -11,6 +11,9 @@
 def execute(filters=None):
 	if not filters: filters = {}
 
+	if filters.from_date > filters.to_date:
+		frappe.throw(_("From Date must be before To Date"))
+
 	float_precision = cint(frappe.db.get_default("float_precision")) or 3
 
 	columns = get_columns(filters)
diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py
index 63c36b3..7b17c8c 100644
--- a/erpnext/utilities/activation.py
+++ b/erpnext/utilities/activation.py
@@ -11,8 +11,39 @@
 	activation_level = 0
 	sales_data = []
 	min_count = 0
-	doctypes = {"Item": 5, "Customer": 5, "Sales Order": 2, "Sales Invoice": 2, "Purchase Order": 2, "Employee": 3, "Lead": 3, "Quotation": 3,
-					"Payment Entry": 2, "User": 5, "Student": 5, "Instructor": 5, "BOM": 3, "Journal Entry": 3, "Stock Entry": 3}
+	doctypes = {
+		"Asset": 5,
+		"BOM": 3, 
+		"Customer": 5, 
+		"Delivery Note": 5,
+		"Employee": 3, 
+		"Instructor": 5, 
+		"Instructor": 5, 
+		"Issue": 5,
+		"Item": 5, 
+		"Journal Entry": 3, 
+		"Lead": 3,
+		"Leave Application": 5,
+		"Material Request": 5,
+		"Opportunity": 5, 
+		"Payment Entry": 2, 
+		"Project": 5,
+		"Purchase Order": 2, 
+		"Purchase Invoice": 5,
+		"Purchase Receipt": 5,
+		"Quotation": 3,
+		"Salary Slip": 5,
+		"Salary Structure": 5,
+		"Sales Order": 2, 
+		"Sales Invoice": 2, 
+		"Stock Entry": 3,
+		"Student": 5, 
+		"Supplier": 5,
+		"Task": 5,
+		"User": 5, 
+		"Work Order": 5
+	}
+
 	for doctype, min_count in iteritems(doctypes):
 		count = frappe.db.count(doctype)
 		if count > min_count: