Merge pull request #7654 from rohitwaghchaure/lead_tax_issue

[Fix] Set default tax on quotation when it's making from the lead
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index d916789..dcc072d 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
 from __future__ import unicode_literals
 import frappe
 
-__version__ = '7.2.18'
+__version__ = '7.2.19'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index abc6eba..11dcfe7 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -74,6 +74,9 @@
 		clearance_date_updated = False
 		for d in self.get('payment_entries'):
 			if d.clearance_date:
+				if not d.payment_document:
+					frappe.throw(_("Row #{0}: Payment document is required to complete the trasaction"))
+
 				if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
 					frappe.throw(_("Row #{0}: Clearance date {1} cannot be before Cheque Date {2}")
 						.format(d.idx, d.clearance_date, d.cheque_date))
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.json b/erpnext/accounts/doctype/cost_center/cost_center.json
index f590b5d..9aaaed2 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.json
+++ b/erpnext/accounts/doctype/cost_center/cost_center.json
@@ -278,14 +278,14 @@
  "icon": "fa fa-money", 
  "idx": 1, 
  "image_view": 0, 
- "in_create": 1, 
+ "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 0, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2016-11-07 05:20:40.282432", 
+ "modified": "2017-01-30 11:27:36.615323", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Cost Center", 
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py
index a13cc7d..0cf34dd 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.py
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py
@@ -46,6 +46,9 @@
 		self.accounts = [account for account in self.accounts
 			if not (account.debit_in_account_currency==0.0 and account.credit_in_account_currency==0.0)]
 
+		if not self.accounts:
+			frappe.throw("Debit or Credit amount is not found in account table")
+
 	def on_submit(self):
 		self.check_credit_limit()
 		self.make_gl_entries()
diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json
index 82040fa..98fa445 100644
--- a/erpnext/accounts/doctype/payment_entry/payment_entry.json
+++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json
@@ -102,95 +102,6 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)", 
-   "fieldname": "party_type", 
-   "fieldtype": "Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 1, 
-   "label": "Party Type", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "DocType", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 1, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 1, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type", 
-   "fieldname": "party", 
-   "fieldtype": "Dynamic Link", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 1, 
-   "label": "Party", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "party_type", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 1, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
-   "description": "", 
-   "fieldname": "party_name", 
-   "fieldtype": "Data", 
-   "hidden": 0, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Party Name", 
-   "length": 0, 
-   "no_copy": 0, 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 0, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
    "fieldname": "column_break_5", 
    "fieldtype": "Column Break", 
    "hidden": 0, 
@@ -212,7 +123,7 @@
    "search_index": 0, 
    "set_only_once": 0, 
    "unique": 0
-  }, 
+  },    
   {
    "allow_on_submit": 0, 
    "bold": 1, 
@@ -303,6 +214,152 @@
   {
    "allow_on_submit": 0, 
    "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type", 
+   "fieldname": "party_section", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Payment From / To", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type)", 
+   "fieldname": "party_type", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 1, 
+   "label": "Party Type", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "DocType", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 1, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type", 
+   "fieldname": "party", 
+   "fieldtype": "Dynamic Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 1, 
+   "label": "Party", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "party_type", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_11", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "depends_on": "eval:in_list([\"Receive\", \"Pay\"], doc.payment_type) && doc.party_type", 
+   "description": "", 
+   "fieldname": "party_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Party Name", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
    "collapsible": 1, 
    "columns": 0, 
    "fieldname": "payment_accounts_section", 
@@ -1561,7 +1618,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-12-26 14:32:36.900576", 
+ "modified": "2017-01-30 00:41:51.348616", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Payment Entry", 
@@ -1578,7 +1635,6 @@
    "export": 1, 
    "if_owner": 0, 
    "import": 1, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1599,7 +1655,6 @@
    "export": 1, 
    "if_owner": 0, 
    "import": 1, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1617,5 +1672,6 @@
  "sort_field": "modified", 
  "sort_order": "DESC", 
  "title_field": "title", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
index f77560c..57fce65 100644
--- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
+++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.json
@@ -22,6 +22,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Reference Type", 
    "length": 0, 
    "no_copy": 0, 
@@ -30,6 +31,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -48,7 +50,8 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
-   "label": "Reference_name", 
+   "in_standard_filter": 0, 
+   "label": "Reference Name", 
    "length": 0, 
    "no_copy": 0, 
    "options": "reference_type", 
@@ -57,6 +60,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -75,6 +79,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Posting Date", 
    "length": 0, 
    "no_copy": 0, 
@@ -82,6 +87,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -100,6 +106,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Is Advance", 
    "length": 0, 
    "no_copy": 0, 
@@ -107,6 +114,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -125,6 +133,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Reference Row", 
    "length": 0, 
    "no_copy": 0, 
@@ -132,6 +141,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -150,6 +160,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "", 
    "length": 0, 
    "no_copy": 0, 
@@ -157,6 +168,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -175,6 +187,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Invoice Number", 
    "length": 0, 
    "no_copy": 0, 
@@ -183,6 +196,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 1, 
    "search_index": 0, 
@@ -201,6 +215,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Amount", 
    "length": 0, 
    "no_copy": 0, 
@@ -208,6 +223,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -226,6 +242,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Allocated amount", 
    "length": 0, 
    "no_copy": 0, 
@@ -234,6 +251,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 1, 
    "search_index": 0, 
@@ -252,6 +270,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "", 
    "length": 0, 
    "no_copy": 0, 
@@ -259,6 +278,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -277,6 +297,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Remark", 
    "length": 0, 
    "no_copy": 0, 
@@ -284,6 +305,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -302,7 +324,7 @@
  "istable": 1, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2016-08-26 02:08:35.879133", 
+ "modified": "2017-01-30 01:04:22.557237", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Payment Reconciliation Payment", 
@@ -314,5 +336,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.js b/erpnext/accounts/doctype/pricing_rule/pricing_rule.js
index 5a3e651..03bb7ae 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.js
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.js
@@ -91,8 +91,8 @@
 }
 
 //Dynamically change the description based on type of margin
-cur_frm.cscript.type = function(doc){
-	cur_frm.set_df_property('rate', 'description', doc.type=='Percentage'?'In Percentage %':'In Amount')
+cur_frm.cscript.margin_type = function(doc){
+	cur_frm.set_df_property('margin_rate_or_amount', 'description', doc.margin_type=='Percentage'?'In Percentage %':'In Amount')
 }
 
 frappe.ui.form.on('Pricing Rule', 'price_or_discount', function(frm){
@@ -112,4 +112,4 @@
 			}
 		}
 	}
-})
\ No newline at end of file
+})
diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
index 3c62297..c5d2b31 100644
--- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
+++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py
@@ -123,12 +123,13 @@
 	
 def get_serial_no_for_item(args):
 	from erpnext.stock.get_item_details import get_serial_no
+
 	item_details = frappe._dict({
 		"doctype": args.doctype,
 		"name": args.name,
 		"serial_no": args.serial_no
 	})
-	if args.get("parenttype") in ("Sales Invoice", "Delivery Note"):
+	if args.get("parenttype") in ("Sales Invoice", "Delivery Note") and args.qty > 0:
 		item_details.serial_no = get_serial_no(args)
 	return item_details
 
diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
index 6f8e219..a91d974 100755
--- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
+++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json
@@ -1316,6 +1316,34 @@
    "unique": 0
   }, 
   {
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "is_sample_item", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Is Sample Item", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -1788,7 +1816,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-11-16 16:04:52.465169", 
+ "modified": "2017-02-07 01:21:03.737800", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Purchase Invoice Item", 
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
index f026cb0..4fb3dba 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.json
@@ -6,7 +6,7 @@
  "beta": 0, 
  "creation": "2013-05-24 19:29:05", 
  "custom": 0, 
- "default_print_format": "Standard", 
+ "default_print_format": "Sample Print", 
  "docstatus": 0, 
  "doctype": "DocType", 
  "document_type": "", 
@@ -22,13 +22,12 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "icon-user", 
+   "options": "fa fa-user", 
    "permlevel": 0, 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
@@ -51,7 +50,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Title", 
@@ -79,7 +77,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Series", 
@@ -109,7 +106,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 1, 
    "label": "Customer", 
@@ -140,7 +136,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Customer Name", 
@@ -169,7 +164,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Is POS", 
@@ -199,7 +193,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Is Return", 
@@ -227,12 +220,11 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Offline POS Name", 
    "length": 0, 
-   "no_copy": 1, 
+   "no_copy": 0, 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -255,7 +247,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -283,7 +274,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Date", 
@@ -312,7 +302,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Payment Due Date", 
@@ -341,7 +330,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Company", 
@@ -371,7 +359,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Project", 
@@ -401,7 +388,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 1, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Amended From", 
@@ -432,7 +418,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Return Against Sales Invoice", 
@@ -462,7 +447,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Address and Contact", 
@@ -490,7 +474,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Customer Address", 
@@ -518,7 +501,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Address", 
@@ -545,7 +527,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Contact Person", 
@@ -573,7 +554,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Contact", 
@@ -600,7 +580,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Mobile No", 
@@ -627,7 +606,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Contact Email", 
@@ -655,7 +633,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -682,7 +659,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Shipping Address Name", 
@@ -711,7 +687,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Shipping Address", 
@@ -740,7 +715,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Customer Group", 
@@ -768,7 +742,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Territory", 
@@ -777,7 +750,7 @@
    "options": "Territory", 
    "permlevel": 0, 
    "precision": "", 
-   "print_hide": 0, 
+   "print_hide": 1, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
    "remember_last_selected_value": 0, 
@@ -798,7 +771,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Currency and Price List", 
@@ -826,7 +798,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Currency", 
@@ -857,7 +828,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Exchange Rate", 
@@ -887,7 +857,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -914,7 +883,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Price List", 
@@ -944,7 +912,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Price List Currency", 
@@ -973,7 +940,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Price List Exchange Rate", 
@@ -1001,7 +967,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Ignore Pricing Rule", 
@@ -1028,14 +993,13 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "", 
    "length": 0, 
    "no_copy": 0, 
    "oldfieldtype": "Section Break", 
-   "options": "icon-shopping-cart", 
+   "options": "fa fa-shopping-cart", 
    "permlevel": 0, 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
@@ -1057,7 +1021,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Update Stock", 
@@ -1086,7 +1049,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Items", 
@@ -1116,13 +1078,12 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Packing List", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "icon-suitcase", 
+   "options": "fa fa-suitcase", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -1144,7 +1105,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Packed Items", 
@@ -1172,7 +1132,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Product Bundle Help", 
@@ -1201,7 +1160,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Time Sheet List", 
@@ -1229,7 +1187,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Time Sheets", 
@@ -1259,7 +1216,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Billing Amount", 
@@ -1287,7 +1243,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1313,7 +1268,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total (Company Currency)", 
@@ -1342,7 +1296,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Net Total (Company Currency)", 
@@ -1372,7 +1325,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1398,7 +1350,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Net Total", 
@@ -1426,7 +1377,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total", 
@@ -1455,14 +1405,13 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "", 
    "length": 0, 
    "no_copy": 0, 
    "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
+   "options": "fa fa-money", 
    "permlevel": 0, 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
@@ -1484,7 +1433,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Taxes and Charges", 
@@ -1514,7 +1462,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1540,7 +1487,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Shipping Rule", 
@@ -1569,7 +1515,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1595,7 +1540,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Taxes and Charges", 
@@ -1625,7 +1569,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Taxes and Charges Calculation", 
@@ -1653,7 +1596,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1679,7 +1621,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Taxes and Charges (Company Currency)", 
@@ -1709,7 +1650,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1736,7 +1676,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Taxes and Charges", 
@@ -1765,7 +1704,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Additional Discount", 
@@ -1794,7 +1732,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Apply Additional Discount On", 
@@ -1823,7 +1760,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Additional Discount Amount (Company Currency)", 
@@ -1852,7 +1788,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -1878,7 +1813,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Additional Discount Percentage", 
@@ -1906,7 +1840,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Additional Discount Amount", 
@@ -1934,14 +1867,13 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "", 
    "length": 0, 
    "no_copy": 0, 
    "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
+   "options": "fa fa-money", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -1963,7 +1895,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Grand Total (Company Currency)", 
@@ -1993,7 +1924,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Rounded Total (Company Currency)", 
@@ -2024,7 +1954,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "In Words (Company Currency)", 
@@ -2053,7 +1982,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -2081,7 +2009,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "Grand Total", 
@@ -2111,7 +2038,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Rounded Total", 
@@ -2141,7 +2067,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "In Words", 
@@ -2170,7 +2095,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Advance", 
@@ -2200,7 +2124,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 1, 
    "label": "Outstanding Amount", 
@@ -2231,14 +2154,13 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Advance Payments", 
    "length": 0, 
    "no_copy": 0, 
    "oldfieldtype": "Section Break", 
-   "options": "icon-money", 
+   "options": "fa fa-money", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -2260,7 +2182,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Get Advances Received", 
@@ -2289,7 +2210,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Advances", 
@@ -2321,13 +2241,12 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Payments", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "icon-money", 
+   "options": "fa fa-money", 
    "permlevel": 0, 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
@@ -2350,7 +2269,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Cash/Bank Account", 
@@ -2380,7 +2298,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Invoice Payment", 
@@ -2409,7 +2326,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -2436,7 +2352,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Paid Amount (Company Currency)", 
@@ -2465,7 +2380,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -2493,7 +2407,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Paid Amount", 
@@ -2523,7 +2436,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -2550,7 +2462,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Base Change Amount (Company Currency)", 
@@ -2579,7 +2490,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -2606,7 +2516,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Change Amount", 
@@ -2635,7 +2544,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Account for Change Amount", 
@@ -2666,7 +2574,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Write Off", 
@@ -2695,7 +2602,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Write Off Amount", 
@@ -2723,7 +2629,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Write Off Amount (Company Currency)", 
@@ -2753,7 +2658,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Write Off Outstanding Amount", 
@@ -2781,7 +2685,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -2809,7 +2712,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Write Off Account", 
@@ -2838,7 +2740,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Write Off Cost Center", 
@@ -2867,7 +2768,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Terms", 
@@ -2896,7 +2796,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Terms", 
@@ -2926,7 +2825,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Terms and Conditions Details", 
@@ -2955,7 +2853,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Printing Settings", 
@@ -2983,7 +2880,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Letter Head", 
@@ -3013,7 +2909,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Print Language", 
@@ -3041,7 +2936,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -3068,7 +2962,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Print Heading", 
@@ -3099,7 +2992,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "More Information", 
@@ -3128,7 +3020,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Campaign", 
@@ -3158,7 +3049,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -3186,7 +3076,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Status", 
@@ -3215,7 +3104,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Source", 
@@ -3245,14 +3133,13 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Accounting Details", 
    "length": 0, 
    "no_copy": 0, 
    "oldfieldtype": "Section Break", 
-   "options": "icon-file-text", 
+   "options": "fa fa-file-text", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -3275,7 +3162,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Debit To", 
@@ -3305,7 +3191,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Party Account Currency", 
@@ -3336,7 +3221,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Is Opening Entry", 
@@ -3366,7 +3250,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "C-Form Applicable", 
@@ -3394,7 +3277,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "C-Form No", 
@@ -3422,7 +3304,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -3449,7 +3330,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Posting Time", 
@@ -3478,7 +3358,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Remarks", 
@@ -3508,14 +3387,13 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Commission", 
    "length": 0, 
    "no_copy": 0, 
    "oldfieldtype": "Section Break", 
-   "options": "icon-group", 
+   "options": "fa fa-group", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -3537,7 +3415,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Partner", 
@@ -3567,7 +3444,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -3595,7 +3471,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Commission Rate (%)", 
@@ -3624,7 +3499,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Commission", 
@@ -3655,7 +3529,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Team", 
@@ -3682,7 +3555,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Team1", 
@@ -3714,13 +3586,12 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Recurring", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "icon-time", 
+   "options": "fa fa-time", 
    "permlevel": 0, 
    "print_hide": 1, 
    "print_hide_if_no_value": 0, 
@@ -3742,7 +3613,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Settings", 
@@ -3772,7 +3642,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Is Recurring", 
@@ -3801,7 +3670,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Reference Document", 
@@ -3831,7 +3699,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Frequency", 
@@ -3861,7 +3728,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Repeat on Day of Month", 
@@ -3890,7 +3756,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "End Date", 
@@ -3918,7 +3783,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Submit on creation", 
@@ -3948,7 +3812,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Notify by email", 
@@ -3978,7 +3841,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Notification Email Address", 
@@ -4007,7 +3869,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Recurring Print Format", 
@@ -4036,7 +3897,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "This Document", 
@@ -4066,7 +3926,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "From Date", 
@@ -4095,7 +3954,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "To Date", 
@@ -4124,7 +3982,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Next Date", 
@@ -4151,7 +4008,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Against Income Account", 
@@ -4173,7 +4029,7 @@
  ], 
  "hide_heading": 0, 
  "hide_toolbar": 0, 
- "icon": "icon-file-text", 
+ "icon": "fa fa-file-text", 
  "idx": 181, 
  "image_view": 0, 
  "in_create": 0, 
@@ -4183,7 +4039,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-01-18 13:21:13.226318", 
+ "modified": "2017-02-02 17:03:01.892758", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Invoice", 
@@ -4199,7 +4055,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -4220,7 +4075,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -4241,7 +4095,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 1, 
    "print": 0, 
    "read": 1, 
@@ -4262,7 +4115,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 1, 
    "print": 0, 
    "read": 1, 
@@ -4282,6 +4134,6 @@
  "sort_order": "DESC", 
  "timeline_field": "customer", 
  "title_field": "title", 
- "track_changes": 1, 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
index 3eb2f7d..3dfe680 100644
--- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
@@ -963,40 +963,6 @@
 		si.insert()
 		self.assertEqual(si.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
 
-	def test_party_status(self):
-		from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
-		from frappe.utils import random_string
-
-		customer_name = 'test customer for status'
-
-		if frappe.db.exists('Customer', customer_name):
-			customer = frappe.get_doc('Customer', customer_name)
-			customer.db_set('status', 'Active')
-		else:
-			customer = frappe.get_doc({
-				'doctype': 'Customer',
-				'customer_name': customer_name,
-				'customer_group': 'Commercial',
-				'customer_type': 'Individual',
-				'territory': 'Rest of the World'
-			}).insert()
-
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
-		invoice = create_sales_invoice(customer="test customer for status",
-			debit_to="_Test Receivable - _TC",
-			currency="USD", conversion_rate=50)
-
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
-		pe = get_payment_entry(invoice.doctype, invoice.name)
-		pe.reference_no = random_string(10)
-		pe.reference_date = invoice.posting_date
-		pe.insert()
-		pe.submit()
-
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
 	def test_outstanding_amount_after_advance_jv_cancelation(self):
 		from erpnext.accounts.doctype.journal_entry.test_journal_entry \
 			import test_records as jv_test_records
diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
index 944230b..bf6d986 100644
--- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
+++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
@@ -1382,6 +1382,34 @@
    "unique": 0
   }, 
   {
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "is_sample_item", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Is Sample Item", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -1882,7 +1910,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-11-16 16:04:02.438952", 
+ "modified": "2017-02-07 01:21:47.142162", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Sales Invoice Item", 
diff --git a/erpnext/accounts/party_status.py b/erpnext/accounts/party_status.py
deleted file mode 100644
index 6d9efb1..0000000
--- a/erpnext/accounts/party_status.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
-# License: GNU General Public License v3. See license.txt
-
-from __future__ import unicode_literals
-
-import frappe
-
-from frappe.utils import evaluate_filters
-from frappe.desk.notifications import get_filters_for
-
-# NOTE: if you change this also update triggers in erpnext/hooks.py
-status_depends_on = {
-	'Customer': ('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice', 'Project', 'Issue'),
-	'Supplier': ('Supplier Quotation', 'Purchase Order', 'Purchase Receipt', 'Purchase Invoice')
-}
-
-default_status = {
-	'Customer': 'Active',
-	'Supplier': None
-}
-
-def notify_status(doc, method=None):
-	'''Notify status to customer, supplier'''
-
-	party_type = None
-	for key, doctypes in status_depends_on.iteritems():
-		if doc.doctype in doctypes:
-			party_type = key
-			break
-
-	if not party_type:
-		return
-
-	name = doc.get(party_type.lower())
-	if not name:
-		return
-
-	party = frappe.get_doc(party_type, name)
-	filters = get_filters_for(doc.doctype)
-	party.flags.ignore_mandatory = True
-
-	status = None
-	if filters:
-		if evaluate_filters(doc, filters):
-			# filters match, passed document is open
-			status = 'Open'
-
-	if status=='Open':
-		if party.status != 'Open':
-			# party not open, make it open
-			party.status = 'Open'
-			party.save(ignore_permissions=True)
-
-	else:
-		if party.status == 'Open':
-			# may be open elsewhere, check
-			# default status
-			update_status(party)
-
-	party.update_modified()
-	party.notify_update()
-
-def get_party_status(doc):
-	'''return party status based on open documents'''
-	status = default_status[doc.doctype]
-	for doctype in status_depends_on[doc.doctype]:
-		filters = get_filters_for(doctype)
-		filters[doc.doctype.lower()] = doc.name
-		if filters:
-			open_count = frappe.get_all(doctype, fields='name', filters=filters, limit_page_length=1)
-			if len(open_count) > 0:
-				status = 'Open'
-				break
-
-	return status
-
-def update_status(doc):
-	'''Set status as open if there is any open notification'''
-	status = get_party_status(doc)
-	if doc.status != status:
-		doc.db_set('status', status)
diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py
index 3451238..df6cb3c 100644
--- a/erpnext/accounts/report/gross_profit/gross_profit.py
+++ b/erpnext/accounts/report/gross_profit/gross_profit.py
@@ -4,6 +4,7 @@
 from __future__ import unicode_literals
 import frappe
 from frappe import _, scrub
+from erpnext.stock.utils import get_incoming_rate
 from frappe.utils import flt
 
 
@@ -208,21 +209,18 @@
 								flt(my_sle[i+1].stock_value) or 0.0
 							return  previous_stock_value - flt(sle.stock_value)
 			else:
-				return flt(row.qty) * self.get_average_buying_rate(item_code)
-
+				return flt(row.qty) * self.get_average_buying_rate(row, item_code)
 
 		return 0.0
 
-	def get_average_buying_rate(self, item_code):
+	def get_average_buying_rate(self, row, item_code):
 		if not item_code in self.average_buying_rate:
 			if item_code in self.non_stock_items:
 				self.average_buying_rate[item_code] = flt(frappe.db.sql("""select sum(base_net_amount) / sum(qty * conversion_factor)
 					from `tabPurchase Invoice Item`
 					where item_code = %s and docstatus=1""", item_code)[0][0])
 			else:
-				self.average_buying_rate[item_code] = flt(frappe.db.sql("""select avg(valuation_rate)
-					from `tabStock Ledger Entry`
-					where item_code = %s and qty_after_transaction > 0""", item_code)[0][0])
+				self.average_buying_rate[item_code] = get_incoming_rate(row)
 
 		return self.average_buying_rate[item_code]
 
diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py
index 09ba40c..c0a4212 100644
--- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py
+++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py
@@ -11,9 +11,11 @@
 value_fields = ("income", "expense", "gross_profit_loss")
 
 def execute(filters=None):
+	if not filters.get('based_on'): filters["based_on"] = 'Cost Center'
+
 	based_on = filters.based_on.replace(' ', '_').lower()
 	validate_filters(filters)
-	accounts = get_accounts_data(based_on, filters.company)
+	accounts = get_accounts_data(based_on, filters.get("company"))
 	data = get_data(accounts, filters, based_on)
 	columns = get_columns(filters)
 	return columns, data
@@ -27,14 +29,14 @@
 
 def get_data(accounts, filters, based_on):
 	if not accounts:
-		return None
+		return []
 
 	accounts, accounts_by_name, parent_children_map = filter_accounts(accounts)
 
 	gl_entries_by_account = {}
 
-	set_gl_entries_by_account(filters.company, filters.from_date,
-		filters.to_date, based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry))
+	set_gl_entries_by_account(filters.get("company"), filters.get("from_date"),
+		filters.get("to_date"), based_on, gl_entries_by_account, ignore_closing_entries=not flt(filters.get("with_period_closing_entry")))
 
 	total_row = calculate_values(accounts, gl_entries_by_account, filters)
 	accumulate_values_into_parents(accounts, accounts_by_name)
@@ -90,7 +92,7 @@
 
 def prepare_data(accounts, filters, total_row, parent_children_map, based_on):
 	data = []
-	company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
+	company_currency = frappe.db.get_value("Company", filters.get("company"), "default_currency")
 
 	for d in accounts:
 		has_value = False
@@ -99,7 +101,7 @@
 			"account": d.name,
 			"parent_account": d.parent_account,
 			"indent": d.indent,
-			"fiscal_year": filters.fiscal_year,
+			"fiscal_year": filters.get("fiscal_year"),
 			"currency": company_currency,
 			"based_on": based_on
 		}
@@ -122,9 +124,9 @@
 	return [
 		{
 			"fieldname": "account",
-			"label": _(filters.based_on),
+			"label": _(filters.get("based_on")),
 			"fieldtype": "Link",
-			"options": filters.based_on,
+			"options": filters.get("based_on"),
 			"width": 300
 		},
 		{
diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json
index 4b8f8c5..277a5b9 100644
--- a/erpnext/buying/doctype/supplier/supplier.json
+++ b/erpnext/buying/doctype/supplier/supplier.json
@@ -163,35 +163,6 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Status", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "\nOpen", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 1, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 1, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
    "fieldname": "column_break0", 
    "fieldtype": "Column Break", 
    "hidden": 0, 
@@ -796,7 +767,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-11-07 05:24:30.465053", 
+ "modified": "2017-01-30 00:52:31.193443", 
  "modified_by": "Administrator", 
  "module": "Buying", 
  "name": "Supplier", 
@@ -813,7 +784,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -834,7 +804,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -855,7 +824,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -876,7 +844,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 0, 
    "read": 1, 
@@ -897,7 +864,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -918,7 +884,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 0, 
    "read": 1, 
@@ -939,7 +904,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -957,5 +921,6 @@
  "search_fields": "supplier_name, supplier_type", 
  "sort_order": "ASC", 
  "title_field": "supplier_name", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py
index 7f92767..704e828 100644
--- a/erpnext/buying/doctype/supplier/supplier.py
+++ b/erpnext/buying/doctype/supplier/supplier.py
@@ -11,7 +11,6 @@
 
 from erpnext.utilities.transaction_base import TransactionBase
 from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
-from erpnext.accounts.party_status import get_party_status
 
 class Supplier(TransactionBase):
 	def get_feed(self):
@@ -59,7 +58,6 @@
 				msgprint(_("Series is mandatory"), raise_exception=1)
 
 		validate_party_accounts(self)
-		self.status = get_party_status(self)
 
 	def on_trash(self):
 		delete_contact_and_address('Supplier', self.name)
diff --git a/erpnext/buying/doctype/supplier/supplier_list.js b/erpnext/buying/doctype/supplier/supplier_list.js
index acf8e68..dd98c43 100644
--- a/erpnext/buying/doctype/supplier/supplier_list.js
+++ b/erpnext/buying/doctype/supplier/supplier_list.js
@@ -1,8 +1,3 @@
 frappe.listview_settings['Supplier'] = {
-	add_fields: ["supplier_name", "supplier_type", 'status'],
-	get_indicator: function(doc) {
-		if(doc.status==="Open") {
-			return [doc.status, "red", "status,=," + doc.status];
-		}
-	}
+	add_fields: ["supplier_name", "supplier_type"],
 };
diff --git a/erpnext/config/learn.py b/erpnext/config/learn.py
index 426449b..86db808 100644
--- a/erpnext/config/learn.py
+++ b/erpnext/config/learn.py
@@ -44,7 +44,7 @@
 				},
 				{
 					"type": "help",
-					"label": _("Setting up Email"),
+					"label": _("Setting up Email Account"),
 					"youtube_id": "YFYe0DrB95o"
 				},
 				{
@@ -64,11 +64,6 @@
 				},
 				{
 					"type": "help",
-					"label": _("Email Account"),
-					"youtube_id": "YFYe0DrB95o"
-				},
-				{
-					"type": "help",
 					"label": _("File Manager"),
 					"youtube_id": "4-osLW3E_Rk"
 				},
diff --git a/erpnext/config/schools.py b/erpnext/config/schools.py
index a4c5744..e95b734 100644
--- a/erpnext/config/schools.py
+++ b/erpnext/config/schools.py
@@ -128,7 +128,11 @@
 				},
 				{
 					"type": "doctype",
-					"name": "Evaluation Criteria"
+					"name": "Assessment Criteria"
+				},
+				{
+					"type": "doctype",
+					"name": "Assessment Criteria Group"
 				},
 				{
 					"type": "doctype",
diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py
index 4fbee58..55bcaf3 100644
--- a/erpnext/controllers/status_updater.py
+++ b/erpnext/controllers/status_updater.py
@@ -6,7 +6,6 @@
 from frappe.utils import flt, comma_or, nowdate, getdate
 from frappe import _
 from frappe.model.document import Document
-from erpnext.accounts.party_status import notify_status
 
 def validate_status(status, options):
 	if status not in options:
@@ -287,7 +286,6 @@
 				target = frappe.get_doc(args["target_parent_dt"], args["name"])
 				target.set_status(update=True)
 				target.notify_update()
-				notify_status(target)
 
 	def _update_modified(self, args, update_modified):
 		args['update_modified'] = ''
diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py
index c489008..add882c 100644
--- a/erpnext/controllers/stock_controller.py
+++ b/erpnext/controllers/stock_controller.py
@@ -54,9 +54,16 @@
 
 						self.check_expense_account(item_row)
 
-						if not sle.stock_value_difference:
-							self.update_stock_ledger_entries(sle)
-							self.validate_negative_stock(sle)
+						# If item is not a sample item 
+						# and ( valuation rate not mentioned in an incoming entry
+						# or incoming entry not found while delivering the item), 
+						# try to pick valuation rate from previous sle or Item master and update in SLE
+						# Otherwise, throw an exception
+
+						if not sle.stock_value_difference and self.doctype != "Stock Reconciliation" \
+							and not item_row.get("is_sample_item"):
+
+							sle = self.update_stock_ledger_entries(sle)
 
 						gl_list.append(self.get_gl_dict({
 							"account": warehouse_account[sle.warehouse]["name"],
@@ -89,20 +96,25 @@
 		return process_gl_map(gl_list)
 
 	def update_stock_ledger_entries(self, sle):
-		sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse,
-			sle.voucher_type, sle.voucher_no)
+		sle.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, 
+			self.doctype, self.name)
+
 		sle.stock_value = flt(sle.qty_after_transaction) * flt(sle.valuation_rate)
-		sle.stock_value_difference = sle.stock_value
+		sle.stock_value_difference = flt(sle.actual_qty) * flt(sle.valuation_rate)
+		
 		if sle.name:
-			frappe.db.sql(""" update `tabStock Ledger Entry` set stock_value = %(stock_value)s,
-				valuation_rate = %(valuation_rate)s, stock_value_difference = %(stock_value_difference)s 
-				where name = %(name)s""", (sle))
-
-	def validate_negative_stock(self, sle):
-		if sle.qty_after_transaction < 0 and sle.actual_qty < 0:
-			frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries (for booking expenses). Please create an incoming stock transaction or mention valuation rate in Item record, and then try submiting {1} {2}")
-			.format(sle.item_code, sle.voucher_type, sle.voucher_no))
-
+			frappe.db.sql("""
+				update 
+					`tabStock Ledger Entry` 
+				set 
+					stock_value = %(stock_value)s,
+					valuation_rate = %(valuation_rate)s, 
+					stock_value_difference = %(stock_value_difference)s 
+				where 
+					name = %(name)s""", (sle))
+					
+		return sle
+					
 	def get_voucher_details(self, default_expense_account, default_cost_center, sle_map):
 		if self.doctype == "Stock Reconciliation":
 			return [frappe._dict({ "name": voucher_detail_no, "expense_account": default_expense_account,
@@ -150,10 +162,18 @@
 
 	def get_stock_ledger_details(self):
 		stock_ledger = {}
-		for sle in frappe.db.sql("""select name, warehouse, stock_value_difference,
-			voucher_detail_no, item_code, posting_date, posting_time, actual_qty, qty_after_transaction
-			from `tabStock Ledger Entry` where voucher_type=%s and voucher_no=%s""",
-			(self.doctype, self.name), as_dict=True):
+		stock_ledger_entries = frappe.db.sql("""
+			select 
+				name, warehouse, stock_value_difference, valuation_rate,
+				voucher_detail_no, item_code, posting_date, posting_time, 
+				actual_qty, qty_after_transaction
+			from
+				`tabStock Ledger Entry`
+			where
+				voucher_type=%s and voucher_no=%s
+		""", (self.doctype, self.name), as_dict=True)
+
+		for sle in stock_ledger_entries:
 				stock_ledger.setdefault(sle.voucher_detail_no, []).append(sle)
 		return stock_ledger
 
diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 9d64177..c306cbf 100644
--- a/erpnext/crm/doctype/lead/lead.py
+++ b/erpnext/crm/doctype/lead/lead.py
@@ -4,7 +4,8 @@
 from __future__ import unicode_literals
 import frappe
 from frappe import _
-from frappe.utils import cstr, validate_email_add, cint, comma_and, has_gravatar, nowdate
+from frappe.utils import (cstr, validate_email_add, cint, comma_and, has_gravatar,
+	getdate, nowdate)
 from frappe.model.mapper import get_mapped_doc
 
 from erpnext.controllers.selling_controller import SellingController
@@ -45,7 +46,7 @@
 
 			self.image = has_gravatar(self.email_id)
 
-		if self.contact_date and self.contact_date < nowdate():
+		if self.contact_date and getdate(self.contact_date) < nowdate():
 			frappe.throw(_("Next Contact Date cannot be in the past"))
 
 	def on_update(self):
@@ -87,7 +88,7 @@
 			"lead": self.name,
 			"docstatus": 1,
 			"status": ["!=", "Lost"]
-			
+
 		})
 
 	def has_lost_quotation(self):
diff --git a/erpnext/demo/setup/setup_data.py b/erpnext/demo/setup/setup_data.py
index 0c6a9b8..c664101 100644
--- a/erpnext/demo/setup/setup_data.py
+++ b/erpnext/demo/setup/setup_data.py
@@ -48,7 +48,7 @@
 		setup_complete({
 			"first_name": "Test",
 			"last_name": "User",
-			"email": "demo@erpnext.com",
+			"email": "test_demo@erpnext.com",
 			"company_tagline": 'Awesome Products and Services',
 			"password": "demo",
 			"fy_start_date": "2015-01-01",
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 66acdb1..14ea74b 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -147,13 +147,6 @@
 		"on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
 	},
 
-	# bubble transaction notification on master
-	('Opportunity', 'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice',
-		'Supplier Quotation', 'Purchase Order', 'Purchase Receipt',
-		'Purchase Invoice', 'Project', 'Issue'): {
-			'on_change': 'erpnext.accounts.party_status.notify_status'
-		},
-
 	"Website Settings": {
 		"validate": "erpnext.portal.doctype.products_settings.products_settings.home_page_is_products"
 	},
diff --git a/erpnext/hr/doctype/employee_loan/employee_loan.py b/erpnext/hr/doctype/employee_loan/employee_loan.py
index 4d7a9f3..568596e 100644
--- a/erpnext/hr/doctype/employee_loan/employee_loan.py
+++ b/erpnext/hr/doctype/employee_loan/employee_loan.py
@@ -111,12 +111,11 @@
 			frappe.throw(_("Monthly Repayment Amount cannot be greater than Loan Amount"))
 
 def get_monthly_repayment_amount(repayment_method, loan_amount, rate_of_interest, repayment_periods):
-	if repayment_method == "Repay Over Number of Periods":
-		if rate_of_interest:
-			monthly_interest_rate = flt(rate_of_interest) / (12 *100)
-			monthly_repayment_amount = math.ceil((loan_amount * monthly_interest_rate *
-				(1 + monthly_interest_rate)**repayment_periods) \
-				/ ((1 + monthly_interest_rate)**repayment_periods - 1))
+	if rate_of_interest:
+		monthly_interest_rate = flt(rate_of_interest) / (12 *100)
+		monthly_repayment_amount = math.ceil((loan_amount * monthly_interest_rate *
+			(1 + monthly_interest_rate)**repayment_periods) \
+			/ ((1 + monthly_interest_rate)**repayment_periods - 1))
 	else:
 		monthly_repayment_amount = math.ceil(flt(loan_amount) / repayment_periods)
 	return monthly_repayment_amount
diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.js b/erpnext/hr/doctype/process_payroll/process_payroll.js
index cfb646d..128e533 100644
--- a/erpnext/hr/doctype/process_payroll/process_payroll.js
+++ b/erpnext/hr/doctype/process_payroll/process_payroll.js
@@ -10,6 +10,19 @@
 		frm.toggle_reqd(['payroll_frequency'], !frm.doc.salary_slip_based_on_timesheet);
 	},
 
+	setup: function(frm) {
+		frm.set_query("payment_account", function() {
+			var account_types = ["Bank", "Cash"];
+			return {
+				filters: {
+					"account_type": ["in", account_types],
+					"is_group": 0,
+					"company": frm.doc.company
+				}
+			}
+		})
+	},
+
 	refresh: function(frm) {
 		frm.disable_save();
 	},
@@ -50,16 +63,6 @@
 				}
 			})
 		}
-	},
-	account: function(frm) {
-		var account_types = ["Bank", "Cash"];
-		return {
-			filters: {
-				"account_type": ["in", account_types],
-				"is_group": 0,
-				"company": frm.doc.company
-			}
-		}
 	}
 })
 
diff --git a/erpnext/hr/doctype/salary_component/salary_component.js b/erpnext/hr/doctype/salary_component/salary_component.js
index 3ed566e..3a2492c 100644
--- a/erpnext/hr/doctype/salary_component/salary_component.js
+++ b/erpnext/hr/doctype/salary_component/salary_component.js
@@ -2,7 +2,16 @@
 // For license information, please see license.txt
 
 frappe.ui.form.on('Salary Component', {
-	refresh: function(frm) {
-
+	setup: function(frm) {
+		frm.set_query("default_account", "accounts", function(doc, cdt, cdn) {
+			var d = locals[cdt][cdn];
+			return {
+				filters: {
+					"root_type": "Expense",
+					"is_group": 0,
+					"company": d.company
+				}
+			}
+		})
 	}
 });
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.json b/erpnext/hr/doctype/salary_structure/salary_structure.json
index ca59ded..b34cff1 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.json
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.json
@@ -21,7 +21,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -48,7 +47,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Company", 
@@ -76,7 +74,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Letter Head", 
@@ -107,7 +104,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Payroll Frequency", 
@@ -136,7 +132,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -164,7 +159,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 1, 
    "in_standard_filter": 1, 
    "label": "Is Active", 
@@ -195,7 +189,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Is Default", 
@@ -224,7 +217,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "From Date", 
@@ -253,7 +245,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "To Date", 
@@ -282,7 +273,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -310,7 +300,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Employees", 
@@ -339,7 +328,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "", 
@@ -368,7 +356,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Salary Slip Based on Timesheet", 
@@ -396,7 +383,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -425,7 +411,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Salary Component", 
@@ -455,7 +440,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Hour Rate", 
@@ -485,7 +469,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "", 
@@ -515,7 +498,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Earning", 
@@ -546,7 +528,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Earnings", 
@@ -576,7 +557,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Deduction", 
@@ -606,7 +586,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Deductions", 
@@ -637,7 +616,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -664,7 +642,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -691,7 +668,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Earning", 
@@ -721,7 +697,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Total Deduction", 
@@ -751,7 +726,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Net Pay", 
@@ -779,7 +753,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Account", 
@@ -807,7 +780,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Mode of Payment", 
@@ -836,7 +808,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -863,7 +834,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Payment Account", 
@@ -894,7 +864,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-01-11 02:02:10.848614", 
+ "modified": "2017-02-02 01:23:49.179497", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Salary Structure", 
@@ -910,7 +880,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -928,10 +897,9 @@
    "create": 1, 
    "delete": 1, 
    "email": 1, 
-   "export": 0, 
+   "export": 1, 
    "if_owner": 0, 
-   "import": 0, 
-   "is_custom": 0, 
+   "import": 1, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -950,5 +918,6 @@
  "sort_order": "DESC", 
  "timeline_field": "", 
  "title_field": "", 
+ "track_changes": 0, 
  "track_seen": 0
-}
+}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py
index cfecd63..d60cd35 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.py
@@ -33,7 +33,13 @@
 def make_salary_slip(source_name, target_doc = None, employee = None, as_print = False, print_format = None):
 	def postprocess(source, target):
 		if employee:
+			employee_details = frappe.db.get_value("Employee", employee, 
+							["employee_name", "branch", "designation", "department"], as_dict=1)
 			target.employee = employee
+			target.employee_name = employee_details.employee_name
+			target.branch = employee_details.branch
+			target.designation = employee_details.designation
+			target.department = employee_details.department
 		target.run_method('process_salary_structure')
 
 	doc = get_mapped_doc("Salary Structure", source_name, {
diff --git a/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json b/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json
index aae33e3..f5ac764 100644
--- a/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json
+++ b/erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.json
@@ -15,13 +15,14 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "employee", 
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Employee", 
    "length": 0, 
    "no_copy": 0, 
@@ -31,6 +32,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 1, 
    "search_index": 0, 
@@ -41,21 +43,24 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "employee_name", 
-   "fieldtype": "Data", 
+   "fieldtype": "Read Only", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Employee Name", 
    "length": 0, 
    "no_copy": 0, 
+   "options": "employee.employee_name", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 1, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -66,13 +71,14 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "base", 
    "fieldtype": "Currency", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Base", 
    "length": 0, 
    "no_copy": 0, 
@@ -81,6 +87,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 1, 
    "search_index": 0, 
@@ -91,13 +98,14 @@
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "variable", 
    "fieldtype": "Currency", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Variable", 
    "length": 0, 
    "no_copy": 0, 
@@ -106,6 +114,7 @@
    "print_hide": 0, 
    "print_hide_if_no_value": 0, 
    "read_only": 0, 
+   "remember_last_selected_value": 0, 
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
@@ -123,7 +132,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-08-11 12:18:14.526977", 
+ "modified": "2017-02-02 02:06:33.809285", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Salary Structure Employee", 
@@ -135,5 +144,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index db5b66c..4692118 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -249,7 +249,7 @@
 				"wip_warehouse"			: "",
 				"fg_warehouse"			: d.warehouse,
 				"status"				: "Draft",
-				"project"			: frappe.db.get_value("Sales Order", d.sales_order, "project")
+				"project"				: frappe.db.get_value("Sales Order", d.sales_order, "project")
 			}
 
 			""" Club similar BOM and item for processing in case of Sales Orders """
@@ -345,53 +345,53 @@
 
 	def get_subitems(self,bom_wise_item_details, bom, parent_qty, include_sublevel, only_raw, supply_subs,non_stock_item=0):
 		items = frappe.db.sql("""
-			SELECT 
-				bom_item.item_code, 
+			SELECT
+				bom_item.item_code,
 				default_material_request_type,
 				ifnull(%(parent_qty)s * sum(bom_item.qty/ifnull(bom.quantity, 1)), 0) as qty,
-				item.is_sub_contracted_item as is_sub_contracted, 
+				item.is_sub_contracted_item as is_sub_contracted,
 				item.default_bom as default_bom,
-				bom_item.description as description,  
-				bom_item.stock_uom as stock_uom, 
-				item.min_order_qty as min_order_qty 
+				bom_item.description as description,
+				bom_item.stock_uom as stock_uom,
+				item.min_order_qty as min_order_qty
 			FROM
-				`tabBOM Item` bom_item, 
-				`tabBOM` bom, 
+				`tabBOM Item` bom_item,
+				`tabBOM` bom,
 				tabItem item
 			where
-				bom.name = bom_item.parent 
-				and bom.name = %(bom)s 
+				bom.name = bom_item.parent
+				and bom.name = %(bom)s
 				and bom_item.docstatus < 2
 				and bom_item.item_code = item.name
 			""" + ("and item.is_stock_item = 1", "")[non_stock_item] + """
 			group by bom_item.item_code""", {"bom": bom, "parent_qty": parent_qty}, as_dict=1)
-		
+
 		for d in items:
-			if ((d.default_material_request_type == "Purchase" 
-				and not (d.is_sub_contracted and only_raw and include_sublevel)) 
+			if ((d.default_material_request_type == "Purchase"
+				and not (d.is_sub_contracted and only_raw and include_sublevel))
 				or (d.default_material_request_type == "Manufacture" and not only_raw)):
 
 				if d.item_code in bom_wise_item_details:
 					bom_wise_item_details[d.item_code].qty = bom_wise_item_details[d.item_code].qty + d.qty
 				else:
 					bom_wise_item_details[d.item_code] = d
-			
+
 			if include_sublevel:
-				if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs) 
+				if ((d.default_material_request_type == "Purchase" and d.is_sub_contracted and supply_subs)
 					or (d.default_material_request_type == "Manufacture")):
-					
+
 					my_qty = 0
 					projected_qty = self.get_item_projected_qty(d.item_code)
-					
+
 					if self.create_material_requests_for_all_required_qty:
 						my_qty = d.qty
 					elif (bom_wise_item_details[d.item_code].qty - d.qty) < projected_qty:
 						my_qty = bom_wise_item_details[d.item_code].qty - projected_qty
 					else:
 						my_qty = d.qty
-						
+
 					if my_qty > 0:
-						self.get_subitems(bom_wise_item_details, 
+						self.get_subitems(bom_wise_item_details,
 							d.default_bom, my_qty, include_sublevel, only_raw, supply_subs)
 
 		return bom_wise_item_details
@@ -408,12 +408,12 @@
 			item_list.append([item, self.item_dict[item][0][1], self.item_dict[item][0][2], total_qty])
 			item_qty = frappe.db.sql("""select warehouse, indented_qty, ordered_qty, actual_qty
 				from `tabBin` where item_code = %s""", item, as_dict=1)
-				
+
 			i_qty, o_qty, a_qty = 0, 0, 0
 			for w in item_qty:
 				i_qty, o_qty, a_qty = i_qty + flt(w.indented_qty), o_qty + \
 					flt(w.ordered_qty), a_qty + flt(w.actual_qty)
-					
+
 				item_list.append(['', '', '', '', w.warehouse, flt(w.indented_qty),
 					flt(w.ordered_qty), flt(w.actual_qty)])
 			if item_qty:
@@ -485,15 +485,15 @@
 	def get_item_projected_qty(self,item):
 		item_projected_qty = frappe.db.sql("""
 			select ifnull(sum(projected_qty),0) as qty
-			from `tabBin` 
+			from `tabBin`
 			where item_code = %(item_code)s and warehouse=%(warehouse)s
 		""", {
-			"item_code": item, 
+			"item_code": item,
 			"warehouse": self.purchase_request_for_warehouse
 		}, as_dict=1)
 
 		return item_projected_qty[0].qty
-		
+
 	def get_projected_qty(self):
 		items = self.item_dict.keys()
 		item_projected_qty = frappe.db.sql("""select item_code, sum(projected_qty)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 9494fbd..e041a2b 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -369,4 +369,5 @@
 erpnext.patches.v7_2.set_null_value_to_fields
 erpnext.patches.v7_2.update_guardian_name_in_student_master
 erpnext.patches.v7_2.update_abbr_in_salary_slips
-erpnext.patches.v7_2.update_party_type
+erpnext.patches.v7_2.rename_evaluation_criteria
+erpnext.patches.v7_2.update_party_type
\ No newline at end of file
diff --git a/erpnext/patches/v7_0/update_party_status.py b/erpnext/patches/v7_0/update_party_status.py
index 208b476..f3733db 100644
--- a/erpnext/patches/v7_0/update_party_status.py
+++ b/erpnext/patches/v7_0/update_party_status.py
@@ -1,8 +1,7 @@
 import frappe
-from erpnext.accounts.party_status import status_depends_on, default_status
-from frappe.desk.notifications import get_filters_for
 
 def execute():
+	return
 	for party_type in ('Customer', 'Supplier'):
 		frappe.reload_doctype(party_type)
 
diff --git a/erpnext/patches/v7_2/rename_evaluation_criteria.py b/erpnext/patches/v7_2/rename_evaluation_criteria.py
new file mode 100644
index 0000000..a45604f
--- /dev/null
+++ b/erpnext/patches/v7_2/rename_evaluation_criteria.py
@@ -0,0 +1,29 @@
+import frappe
+from frappe.model.utils.rename_field import rename_field
+
+def execute():
+	frappe.rename_doc("DocType", "Evaluation Criteria", "Assessment Criteria", force=True)
+	frappe.reload_doc("schools", "doctype", "assessment_criteria")
+	if 'evaluation_criteria' in frappe.db.get_table_columns('Assessment Criteria'):
+		rename_field("Assessment Criteria", "evaluation_criteria", "assessment_criteria")
+
+	frappe.rename_doc("DocType", "Assessment Evaluation Criteria", "Assessment Plan Criteria", force=True)
+	frappe.reload_doc("schools", "doctype", "assessment_plan_criteria")
+	if 'evaluation_criteria' in frappe.db.get_table_columns('Assessment Plan'):
+		rename_field("Assessment Plan Criteria", "evaluation_criteria", "assessment_criteria")
+
+	frappe.reload_doc("schools", "doctype", "assessment_plan")
+	rename_field("Assessment Plan", "evaluation_criterias", "assessment_criteria")
+
+	frappe.reload_doc("schools", "doctype", "assessment_result_detail")
+	if 'evaluation_criteria' in frappe.db.get_table_columns('Assessment Result Detail'):
+		rename_field("Assessment Result Detail", "evaluation_criteria", "assessment_criteria")
+
+	frappe.rename_doc("DocType", "Course Evaluation Criteria", "Course Assessment Criteria", force=True)
+	frappe.reload_doc("schools", "doctype", "course_assessment_criteria")
+	if 'evaluation_criteria' in frappe.db.get_table_columns('Course Assessment Criteria'):
+		rename_field("Course Assessment Criteria", "evaluation_criteria", "assessment_criteria")
+
+	frappe.reload_doc("schools", "doctype", "course")
+	if 'evaluation_criteria' in frappe.db.get_table_columns('Course'):
+		rename_field("Course", "evaluation_criterias", "assessment_criteria")
diff --git a/erpnext/patches/v7_2/update_assessment_modules.py b/erpnext/patches/v7_2/update_assessment_modules.py
index ac04294..9c00902 100644
--- a/erpnext/patches/v7_2/update_assessment_modules.py
+++ b/erpnext/patches/v7_2/update_assessment_modules.py
@@ -17,7 +17,7 @@
 
 	frappe.reload_doc("schools", "doctype", "assessment_result")
 	frappe.reload_doc("schools", "doctype", "assessment_result_detail")
-	frappe.reload_doc("schools", "doctype", "evaluation_criteria")
+	frappe.reload_doc("schools", "doctype", "assessment_criteria")
 
 
 	for assessment in frappe.get_all("Assessment Plan", fields=["name", "grading_scale"], filters = [["docstatus", "!=", 2 ]]):
diff --git a/erpnext/projects/doctype/timesheet/timesheet_calendar.js b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
index 0af1a6c..14f016a 100644
--- a/erpnext/projects/doctype/timesheet/timesheet_calendar.js
+++ b/erpnext/projects/doctype/timesheet/timesheet_calendar.js
@@ -4,7 +4,6 @@
 		"end": "end_date",
 		"name": "parent",
 		"id": "name",
-		"title": "name",
 		"allDay": "allDay",
 		"child_name": "name",
 		"title": "title"
diff --git a/erpnext/public/js/schools/assessment_result_tool.html b/erpnext/public/js/schools/assessment_result_tool.html
index 6f9e256..3c09ccd 100644
--- a/erpnext/public/js/schools/assessment_result_tool.html
+++ b/erpnext/public/js/schools/assessment_result_tool.html
@@ -3,14 +3,14 @@
         <tr>
             <th style="width: 100px" rowspan="2">Student</th>
             <th style="width: 200px" rowspan="2">Student Name</th>
-            {% for c in criterias %}
-            <th class="score" style="width: 100px">{{ c.evaluation_criteria }}</th>
+            {% for c in criteria %}
+            <th class="score" style="width: 100px">{{ c.assessment_criteria }}</th>
             {% endfor %}
             <th class="score" style="width: 100px">Total Marks</th>
             <!--criteria-->
         </tr>
         <tr>
-            {% for c in criterias %}
+            {% for c in criteria %}
             <th class="score" style="width: 100px">{{ c.maximum_score }}</th>
             {% endfor %}
             <th class="score" style="width: 100px">{{max_total_score}}</th>
@@ -23,15 +23,15 @@
             data-student="{{s.student}}">
             <td>{{ s.student }}</td>
             <td>{{ s.student_name }}</td>
-            {% for c in criterias %}
+            {% for c in criteria %}
             <td>
                 <input type="text"
                     data-max-score="{{c.maximum_score}}"
-                    data-criteria="{{c.evaluation_criteria}}"
+                    data-criteria="{{c.assessment_criteria}}"
                     data-student="{{s.student}}"
                     {% if(s.assessment_details) { %}
                         disabled
-                        value="{{s.assessment_details[c.evaluation_criteria]}}"
+                        value="{{s.assessment_details[c.assessment_criteria]}}"
                     {% } %}/>
             </td>
             {% endfor %}
diff --git a/erpnext/schools/api.py b/erpnext/schools/api.py
index 81ae9c4..313b5ff 100644
--- a/erpnext/schools/api.py
+++ b/erpnext/schools/api.py
@@ -167,13 +167,13 @@
 	return data
 
 @frappe.whitelist()
-def get_evaluation_criterias(course):
-	"""Returns Evaluation Criterias and their Weightage from Course Master.
+def get_assessment_criteria(course):
+	"""Returns Assessmemt Criteria and their Weightage from Course Master.
 
 	:param Course: Course
 	"""
-	return frappe.get_list("Course Evaluation Criteria", \
-		fields=["evaluation_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
+	return frappe.get_list("Course Assessment Criteria", \
+		fields=["assessment_criteria", "weightage"], filters={"parent": course}, order_by= "idx")
 
 @frappe.whitelist()
 def get_assessment_students(assessment_plan, student_group=None, student_batch=None):
@@ -187,7 +187,7 @@
 		if result:
 			student_result = {}
 			for d in result.details:
-				student_result.update({d.evaluation_criteria: cstr(d.score) + " ("+ d.grade + ")"})
+				student_result.update({d.assessment_criteria: cstr(d.score) + " ("+ d.grade + ")"})
 			student_result.update({"total_score": cstr(result.total_score) + " (" + result.grade + ")"})
 			student.update({'assessment_details': student_result})
 		else:
@@ -196,12 +196,12 @@
 
 @frappe.whitelist()
 def get_assessment_details(assessment_plan):
-	"""Returns Evaluation Criteria  and Maximum Score from Assessment Plan Master.
+	"""Returns Assessment Criteria  and Maximum Score from Assessment Plan Master.
 
 	:param Assessment Plan: Assessment Plan
 	"""
-	return frappe.get_list("Assessment Evaluation Criteria", \
-		fields=["evaluation_criteria", "maximum_score"], filters={"parent": assessment_plan}, order_by= "idx")
+	return frappe.get_list("Assessment Plan Criteria", \
+		fields=["assessment_criteria", "maximum_score"], filters={"parent": assessment_plan}, order_by= "idx")
 
 @frappe.whitelist()
 def get_result(student, assessment_plan):
@@ -241,7 +241,7 @@
 	details = []
 	for s in student_score.keys():
 		details.append({
-			"evaluation_criteria": s,
+			"assessment_criteria": s,
 			"score": flt(student_score[s])
 		})
 	assessment_result = frappe.new_doc("Assessment Result")
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py b/erpnext/schools/doctype/assessment_criteria/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py
rename to erpnext/schools/doctype/assessment_criteria/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.js
similarity index 78%
rename from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
rename to erpnext/schools/doctype/assessment_criteria/assessment_criteria.js
index 5e0269b..44b9ca3 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.js
@@ -1,7 +1,7 @@
 // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
 // For license information, please see license.txt
 
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Assessment Criteria', {
 	refresh: function(frm) {
 
 	}
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.json
similarity index 64%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
copy to erpnext/schools/doctype/assessment_criteria/assessment_criteria.json
index f830abe..990b22b 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
+++ b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.json
@@ -2,7 +2,7 @@
  "allow_copy": 0, 
  "allow_import": 1, 
  "allow_rename": 0, 
- "autoname": "field:evaluation_criteria", 
+ "autoname": "field:assessment_criteria", 
  "beta": 0, 
  "creation": "2016-12-14 16:40:15.144115", 
  "custom": 0, 
@@ -17,15 +17,14 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "fieldname": "evaluation_criteria", 
+   "fieldname": "assessment_criteria", 
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
-   "label": "Evaluation Criteria", 
+   "label": "Assessment Criteria", 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -39,6 +38,34 @@
    "search_index": 0, 
    "set_only_once": 0, 
    "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 1, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "assessment_criteria_group", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Assessment Criteria Group", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Assessment Criteria Group", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
   }
  ], 
  "hide_heading": 0, 
@@ -51,10 +78,10 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-12-14 16:40:36.351183", 
+ "modified": "2017-02-03 05:53:39.248759", 
  "modified_by": "Administrator", 
  "module": "Schools", 
- "name": "Evaluation Criteria", 
+ "name": "Assessment Criteria", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [
@@ -68,7 +95,6 @@
    "export": 1, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -85,5 +111,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.py
similarity index 86%
rename from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
rename to erpnext/schools/doctype/assessment_criteria/assessment_criteria.py
index 85c1b32..e666a74 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria/assessment_criteria.py
@@ -6,5 +6,5 @@
 import frappe
 from frappe.model.document import Document
 
-class EvaluationCriteria(Document):
+class AssessmentCriteria(Document):
 	pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.py
similarity index 62%
rename from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
rename to erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.py
index 0182db6..fc0d745 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.py
@@ -6,7 +6,7 @@
 import frappe
 import unittest
 
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Assessment Criteria')
 
-class TestEvaluationCriteria(unittest.TestCase):
+class TestAssessmentCriteria(unittest.TestCase):
 	pass
diff --git a/erpnext/schools/doctype/assessment_criteria/test_records.json b/erpnext/schools/doctype/assessment_criteria/test_records.json
new file mode 100644
index 0000000..7af63b3
--- /dev/null
+++ b/erpnext/schools/doctype/assessment_criteria/test_records.json
@@ -0,0 +1,8 @@
+[
+ {
+  "assessment_criteria": "_Test Assessment Criteria"
+ }, 
+ {
+  "assessment_criteria": "_Test Assessment Criteria 1"
+ }
+]
\ No newline at end of file
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py b/erpnext/schools/doctype/assessment_criteria_group/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py
copy to erpnext/schools/doctype/assessment_criteria_group/__init__.py
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.js
similarity index 75%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
copy to erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.js
index 5e0269b..89358d2 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.js
+++ b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.js
@@ -1,7 +1,7 @@
 // Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
 // For license information, please see license.txt
 
-frappe.ui.form.on('Evaluation Criteria', {
+frappe.ui.form.on('Assessment Criteria Group', {
 	refresh: function(frm) {
 
 	}
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.json
similarity index 82%
rename from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
rename to erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.json
index f830abe..0319868 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.json
+++ b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.json
@@ -1,10 +1,10 @@
 {
  "allow_copy": 0, 
  "allow_import": 1, 
- "allow_rename": 0, 
- "autoname": "field:evaluation_criteria", 
+ "allow_rename": 1, 
+ "autoname": "field:assessment_criteria_group", 
  "beta": 0, 
- "creation": "2016-12-14 16:40:15.144115", 
+ "creation": "2017-01-27 15:17:38.855910", 
  "custom": 0, 
  "docstatus": 0, 
  "doctype": "DocType", 
@@ -17,7 +17,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "fieldname": "evaluation_criteria", 
+   "fieldname": "assessment_criteria_group", 
    "fieldtype": "Data", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
@@ -25,7 +25,7 @@
    "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
-   "label": "Evaluation Criteria", 
+   "label": "Assessment Criteria Group", 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -51,10 +51,10 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-12-14 16:40:36.351183", 
+ "modified": "2017-02-01 17:39:12.453618", 
  "modified_by": "Administrator", 
  "module": "Schools", 
- "name": "Evaluation Criteria", 
+ "name": "Assessment Criteria Group", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [
@@ -68,7 +68,6 @@
    "export": 1, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -85,5 +84,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.py
similarity index 85%
copy from erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
copy to erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.py
index 85c1b32..75381e1 100644
--- a/erpnext/schools/doctype/evaluation_criteria/evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria_group/assessment_criteria_group.py
@@ -6,5 +6,5 @@
 import frappe
 from frappe.model.document import Document
 
-class EvaluationCriteria(Document):
+class AssessmentCriteriaGroup(Document):
 	pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py b/erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.py
similarity index 60%
copy from erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
copy to erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.py
index 0182db6..5b29337 100644
--- a/erpnext/schools/doctype/evaluation_criteria/test_evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.py
@@ -6,7 +6,7 @@
 import frappe
 import unittest
 
-# test_records = frappe.get_test_records('Evaluation Criteria')
+# test_records = frappe.get_test_records('Assessment Criteria Group')
 
-class TestEvaluationCriteria(unittest.TestCase):
+class TestAssessmentCriteriaGroup(unittest.TestCase):
 	pass
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.py b/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.py
deleted file mode 100644
index 08f6fd4..0000000
--- a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-import frappe
-from frappe.model.document import Document
-
-class AssessmentEvaluationCriteria(Document):
-	pass
diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.js b/erpnext/schools/doctype/assessment_plan/assessment_plan.js
index f11c10b..9685e0e 100644
--- a/erpnext/schools/doctype/assessment_plan/assessment_plan.js
+++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.js
@@ -21,20 +21,20 @@
     course: function(frm) {
         if (frm.doc.course && frm.doc.maximum_assessment_score) {
             frappe.call({
-                method: "erpnext.schools.api.get_evaluation_criterias",
+                method: "erpnext.schools.api.get_assessment_criteria",
                 args: {
                     course: frm.doc.course
                 },
                 callback: function(r) {
                     if (r.message) {
-                        frm.doc.evaluation_criterias = [];
+                        frm.doc.assessment_criteria = [];
                         $.each(r.message, function(i, d) {
-                            var row = frappe.model.add_child(frm.doc, "Assessment Evaluation Criteria", "evaluation_criterias");
-                            row.evaluation_criteria = d.evaluation_criteria;
+                            var row = frappe.model.add_child(frm.doc, "Assessment Plan Criteria", "assessment_criteria");
+                            row.assessment_criteria = d.assessment_criteria;
                             row.maximum_score = d.weightage / 100 * frm.doc.maximum_assessment_score;
                         });
                     }
-                    refresh_field("evaluation_criterias");
+                    refresh_field("assessment_criteria");
 
                 }
             });
diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.json b/erpnext/schools/doctype/assessment_plan/assessment_plan.json
index 967c689..64ff487 100644
--- a/erpnext/schools/doctype/assessment_plan/assessment_plan.json
+++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.json
@@ -639,7 +639,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "fieldname": "evaluation_criterias", 
+   "fieldname": "assessment_criteria", 
    "fieldtype": "Table", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
@@ -647,10 +647,10 @@
    "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
-   "label": "Evaluation Criterias", 
+   "label": "Assessment Criteria", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "Assessment Evaluation Criteria", 
+   "options": "Assessment Plan Criteria", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -703,7 +703,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-01-05 12:15:33.183100", 
+ "modified": "2017-02-01 17:22:11.816270", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Assessment Plan", 
@@ -720,7 +720,6 @@
    "export": 1, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
diff --git a/erpnext/schools/doctype/assessment_plan/assessment_plan.py b/erpnext/schools/doctype/assessment_plan/assessment_plan.py
index 1b4b671..31e96aa 100644
--- a/erpnext/schools/doctype/assessment_plan/assessment_plan.py
+++ b/erpnext/schools/doctype/assessment_plan/assessment_plan.py
@@ -46,7 +46,7 @@
 
 	def validate_max_score(self):
 		max_score = 0
-		for d in self.evaluation_criterias:
+		for d in self.assessment_criteria:
 			max_score += d.maximum_score
 		if self.maximum_assessment_score != max_score:
-			frappe.throw(_("Sum of Scores of Evaluation Criterias needs to be {0}.".format(self.maximum_assessment_score)))
\ No newline at end of file
+			frappe.throw(_("Sum of Scores of Assessment Criteria needs to be {0}.".format(self.maximum_assessment_score)))
\ No newline at end of file
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py b/erpnext/schools/doctype/assessment_plan_criteria/__init__.py
similarity index 100%
copy from erpnext/schools/doctype/assessment_evaluation_criteria/__init__.py
copy to erpnext/schools/doctype/assessment_plan_criteria/__init__.py
diff --git a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.json b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.json
similarity index 91%
rename from erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.json
rename to erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.json
index 870aaa0..2ba5ca7 100644
--- a/erpnext/schools/doctype/assessment_evaluation_criteria/assessment_evaluation_criteria.json
+++ b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.json
@@ -17,7 +17,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "fieldname": "evaluation_criteria", 
+   "fieldname": "assessment_criteria", 
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
@@ -25,10 +25,10 @@
    "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
-   "label": "Evaluation Criteria", 
+   "label": "Assessment Criteria", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "Evaluation Criteria", 
+   "options": "Assessment Criteria", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -108,10 +108,10 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-12-14 17:31:11.950549", 
+ "modified": "2017-02-01 17:11:47.164623", 
  "modified_by": "Administrator", 
  "module": "Schools", 
- "name": "Assessment Evaluation Criteria", 
+ "name": "Assessment Plan Criteria", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
@@ -120,5 +120,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.py
similarity index 85%
rename from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
rename to erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.py
index b8398a3..53b477f 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
+++ b/erpnext/schools/doctype/assessment_plan_criteria/assessment_plan_criteria.py
@@ -6,5 +6,5 @@
 import frappe
 from frappe.model.document import Document
 
-class CourseEvaluationCriteria(Document):
+class AssessmentPlanCriteria(Document):
 	pass
diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.js b/erpnext/schools/doctype/assessment_result/assessment_result.js
index 265a626..0af5adc 100644
--- a/erpnext/schools/doctype/assessment_result/assessment_result.js
+++ b/erpnext/schools/doctype/assessment_result/assessment_result.js
@@ -17,7 +17,7 @@
                     frm.doc.details = [];
                     $.each(r.message, function(i, d) {
                         var row = frappe.model.add_child(frm.doc, "Assessment Result Detail", "details");
-                        row.evaluation_criteria = d.evaluation_criteria;
+                        row.assessment_criteria = d.assessment_criteria;
                         row.maximum_score = d.maximum_score;
                     });
                 }
diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.py b/erpnext/schools/doctype/assessment_result/assessment_result.py
index 860dcbd..c878ec3 100644
--- a/erpnext/schools/doctype/assessment_result/assessment_result.py
+++ b/erpnext/schools/doctype/assessment_result/assessment_result.py
@@ -21,10 +21,10 @@
 		assessment_details = get_assessment_details(self.assessment_plan)
 		max_scores = {}
 		for d in assessment_details:
-			max_scores.update({d.evaluation_criteria: d.maximum_score})
+			max_scores.update({d.assessment_criteria: d.maximum_score})
 
 		for d in self.details:
-			d.maximum_score = max_scores.get(d.evaluation_criteria)
+			d.maximum_score = max_scores.get(d.assessment_criteria)
 			if d.score > d.maximum_score:
 				frappe.throw(_("Score cannot be greater than Maximum Score"))
 		
diff --git a/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json b/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json
index 87ce120..7956a32 100644
--- a/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json
+++ b/erpnext/schools/doctype/assessment_result_detail/assessment_result_detail.json
@@ -17,7 +17,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 4, 
-   "fieldname": "evaluation_criteria", 
+   "fieldname": "assessment_criteria", 
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
@@ -25,10 +25,10 @@
    "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
-   "label": "Evaluation Criteria", 
+   "label": "Assessment Criteria", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "Evaluation Criteria", 
+   "options": "Assessment Criteria", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -164,7 +164,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-12-27 16:18:12.022257", 
+ "modified": "2017-02-01 18:33:06.006040", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Assessment Result Detail", 
@@ -176,5 +176,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js
index c58304b..8fd670e 100644
--- a/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js
+++ b/erpnext/schools/doctype/assessment_result_tool/assessment_result_tool.js
@@ -39,15 +39,15 @@
 				assessment_plan: assessment_plan
 			},
 			callback: function(r) {
-				var criterias = r.message;
+				var criteria_list = r.message;
 				var max_total_score = 0;
-				criterias.forEach(function(c) {
+				criteria_list.forEach(function(c) {
 					max_total_score += c.maximum_score
 				});
 				var result_table = $(frappe.render_template('assessment_result_tool', {
 					frm: frm,
 					students: students,
-					criterias: criterias,
+					criteria: criteria_list,
 					max_total_score: max_total_score
 				}));
 				result_table.appendTo(frm.fields_dict.result_html.wrapper)
@@ -67,7 +67,8 @@
 						value = max_score;
 					}
 					student_scores[student][criteria] = value;
-					if(Object.keys(student_scores[student]).length == criterias.length) {
+					if(Object.keys(student_scores[student]).length == criteria_list.length) {
+						console.log("ok");
 						frappe.call(({
 							method: "erpnext.schools.api.mark_assessment_result",
 							args: {
@@ -87,7 +88,7 @@
 									var criteria = $input.data().criteria;
 									var value = $input.val();
 									var grade = details.find(function(d) {
-										return d.evaluation_criteria === criteria;
+										return d.assessment_criteria === criteria;
 									}).grade;
 									$input.val(`${value} (${grade})`);
 									$input.attr('disabled', true);
diff --git a/erpnext/schools/doctype/course/course.json b/erpnext/schools/doctype/course/course.json
index 3f16619..aab3bbb 100644
--- a/erpnext/schools/doctype/course/course.json
+++ b/erpnext/schools/doctype/course/course.json
@@ -1,362 +1,364 @@
 {
-    "allow_copy": 0,
-    "allow_import": 1,
-    "allow_rename": 1,
-    "autoname": "field:course_name",
-    "beta": 0,
-    "creation": "2015-09-07 12:39:55.181893",
-    "custom": 0,
-    "docstatus": 0,
-    "doctype": "DocType",
-    "document_type": "",
-    "editable_grid": 0,
-    "engine": "InnoDB",
-    "fields": [{
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "course_name",
-            "fieldtype": "Data",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "label": "Course Name",
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 1,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "course_code",
-            "fieldtype": "Data",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 1,
-            "in_standard_filter": 0,
-            "label": "Course Code",
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "column_break_3",
-            "fieldtype": "Column Break",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "course_abbreviation",
-            "fieldtype": "Data",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "label": "Course Abbreviation",
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "department",
-            "fieldtype": "Link",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 1,
-            "in_standard_filter": 1,
-            "label": "Department",
-            "length": 0,
-            "no_copy": 0,
-            "options": "Department",
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "section_break_6",
-            "fieldtype": "Section Break",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "course_intro",
-            "fieldtype": "Text Editor",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "label": "Course Intro",
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "assessment",
-            "fieldtype": "Section Break",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "label": "Assessment",
-            "length": 0,
-            "no_copy": 0,
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "default_grading_scale",
-            "fieldtype": "Link",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "label": "Default Grading Scale",
-            "length": 0,
-            "no_copy": 0,
-            "options": "Grading Scale",
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        },
-        {
-            "allow_on_submit": 0,
-            "bold": 0,
-            "collapsible": 0,
-            "columns": 0,
-            "fieldname": "evaluation_criterias",
-            "fieldtype": "Table",
-            "hidden": 0,
-            "ignore_user_permissions": 0,
-            "ignore_xss_filter": 0,
-            "in_filter": 0,
-            "in_list_view": 0,
-            "in_standard_filter": 0,
-            "label": "Evaluation Criterias",
-            "length": 0,
-            "no_copy": 0,
-            "options": "Course Evaluation Criteria",
-            "permlevel": 0,
-            "precision": "",
-            "print_hide": 0,
-            "print_hide_if_no_value": 0,
-            "read_only": 0,
-            "remember_last_selected_value": 0,
-            "report_hide": 0,
-            "reqd": 0,
-            "search_index": 0,
-            "set_only_once": 0,
-            "unique": 0
-        }
-    ],
-    "hide_heading": 0,
-    "hide_toolbar": 0,
-    "idx": 0,
-    "image_view": 0,
-    "in_create": 0,
-    "in_dialog": 0,
-    "is_submittable": 0,
-    "issingle": 0,
-    "istable": 0,
-    "max_attachments": 0,
-    "menu_index": 0,
-    "modified": "2016-12-14 16:48:16.642813",
-    "modified_by": "Administrator",
-    "module": "Schools",
-    "name": "Course",
-    "name_case": "",
-    "owner": "Administrator",
-    "permissions": [{
-            "amend": 0,
-            "apply_user_permissions": 0,
-            "cancel": 0,
-            "create": 1,
-            "delete": 1,
-            "email": 1,
-            "export": 1,
-            "if_owner": 0,
-            "import": 0,
-            "is_custom": 0,
-            "permlevel": 0,
-            "print": 1,
-            "read": 1,
-            "report": 1,
-            "role": "Academics User",
-            "set_user_permissions": 0,
-            "share": 1,
-            "submit": 0,
-            "write": 1
-        },
-        {
-            "amend": 0,
-            "apply_user_permissions": 0,
-            "cancel": 0,
-            "create": 1,
-            "delete": 1,
-            "email": 1,
-            "export": 1,
-            "if_owner": 0,
-            "import": 0,
-            "permlevel": 0,
-            "print": 1,
-            "read": 1,
-            "report": 1,
-            "role": "HR Manager",
-            "set_user_permissions": 0,
-            "share": 1,
-            "submit": 0,
-            "write": 1
-        }
-    ],
-    "quick_entry": 0,
-    "read_only": 0,
-    "read_only_onload": 0,
-    "search_fields": "department",
-    "sort_field": "modified",
-    "sort_order": "DESC",
-    "track_seen": 0
+ "allow_copy": 0, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
+ "autoname": "field:course_name", 
+ "beta": 0, 
+ "creation": "2015-09-07 12:39:55.181893", 
+ "custom": 0, 
+ "docstatus": 0, 
+ "doctype": "DocType", 
+ "document_type": "", 
+ "editable_grid": 0, 
+ "engine": "InnoDB", 
+ "fields": [
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "course_name", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Course Name", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 1, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "course_code", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 0, 
+   "label": "Course Code", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "column_break_3", 
+   "fieldtype": "Column Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "course_abbreviation", 
+   "fieldtype": "Data", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Course Abbreviation", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "department", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 1, 
+   "in_standard_filter": 1, 
+   "label": "Department", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Department", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "section_break_6", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "course_intro", 
+   "fieldtype": "Text Editor", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Course Intro", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "assessment", 
+   "fieldtype": "Section Break", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Assessment", 
+   "length": 0, 
+   "no_copy": 0, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "default_grading_scale", 
+   "fieldtype": "Link", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Default Grading Scale", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Grading Scale", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 0, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "assessment_criteria", 
+   "fieldtype": "Table", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Assessment Criteria", 
+   "length": 0, 
+   "no_copy": 0, 
+   "options": "Course Assessment Criteria", 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 0, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }
+ ], 
+ "hide_heading": 0, 
+ "hide_toolbar": 0, 
+ "idx": 0, 
+ "image_view": 0, 
+ "in_create": 0, 
+ "in_dialog": 0, 
+ "is_submittable": 0, 
+ "issingle": 0, 
+ "istable": 0, 
+ "max_attachments": 0, 
+ "menu_index": 0, 
+ "modified": "2017-02-01 17:24:52.874364", 
+ "modified_by": "Administrator", 
+ "module": "Schools", 
+ "name": "Course", 
+ "name_case": "", 
+ "owner": "Administrator", 
+ "permissions": [
+  {
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "export": 1, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "Academics User", 
+   "set_user_permissions": 0, 
+   "share": 1, 
+   "submit": 0, 
+   "write": 1
+  }, 
+  {
+   "amend": 0, 
+   "apply_user_permissions": 0, 
+   "cancel": 0, 
+   "create": 1, 
+   "delete": 1, 
+   "email": 1, 
+   "export": 1, 
+   "if_owner": 0, 
+   "import": 0, 
+   "permlevel": 0, 
+   "print": 1, 
+   "read": 1, 
+   "report": 1, 
+   "role": "HR Manager", 
+   "set_user_permissions": 0, 
+   "share": 1, 
+   "submit": 0, 
+   "write": 1
+  }
+ ], 
+ "quick_entry": 0, 
+ "read_only": 0, 
+ "read_only_onload": 0, 
+ "search_fields": "department", 
+ "sort_field": "modified", 
+ "sort_order": "DESC", 
+ "track_changes": 0, 
+ "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/course/course.py b/erpnext/schools/doctype/course/course.py
index 3baccdf..0ac11ec 100644
--- a/erpnext/schools/doctype/course/course.py
+++ b/erpnext/schools/doctype/course/course.py
@@ -9,12 +9,12 @@
 
 class Course(Document):
 	def validate(self):
-		self.validate_evaluation_criterias()
+		self.validate_assessment_criteria()
 	
-	def validate_evaluation_criterias(self):
-		if self.evaluation_criterias:
+	def validate_assessment_criteria(self):
+		if self.assessment_criteria:
 			total_weightage = 0
-			for criteria in self.evaluation_criterias:
+			for criteria in self.assessment_criteria:
 				total_weightage += criteria.weightage
 			if total_weightage != 100:
-				frappe.throw(_("Total Weightage of all Evaluation Criterias must be 100%"))
+				frappe.throw(_("Total Weightage of all Assessment Criteria must be 100%"))
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/__init__.py b/erpnext/schools/doctype/course_assessment_criteria/__init__.py
similarity index 100%
rename from erpnext/schools/doctype/course_evaluation_criteria/__init__.py
rename to erpnext/schools/doctype/course_assessment_criteria/__init__.py
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.json
similarity index 91%
rename from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json
rename to erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.json
index a4d3ce4..6646d20 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.json
+++ b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.json
@@ -17,7 +17,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "fieldname": "evaluation_criteria", 
+   "fieldname": "assessment_criteria", 
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
@@ -25,10 +25,10 @@
    "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
-   "label": "Evaluation Criteria", 
+   "label": "Assessment Criteria", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "Evaluation Criteria", 
+   "options": "Assessment Criteria", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -108,10 +108,10 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-12-14 16:59:17.353023", 
+ "modified": "2017-02-01 18:01:40.682674", 
  "modified_by": "Administrator", 
  "module": "Schools", 
- "name": "Course Evaluation Criteria", 
+ "name": "Course Assessment Criteria", 
  "name_case": "", 
  "owner": "Administrator", 
  "permissions": [], 
@@ -120,5 +120,6 @@
  "read_only_onload": 0, 
  "sort_field": "modified", 
  "sort_order": "DESC", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.py
similarity index 85%
copy from erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
copy to erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.py
index b8398a3..ade2a39 100644
--- a/erpnext/schools/doctype/course_evaluation_criteria/course_evaluation_criteria.py
+++ b/erpnext/schools/doctype/course_assessment_criteria/course_assessment_criteria.py
@@ -6,5 +6,5 @@
 import frappe
 from frappe.model.document import Document
 
-class CourseEvaluationCriteria(Document):
+class CourseAssessmentCriteria(Document):
 	pass
diff --git a/erpnext/schools/doctype/evaluation_criteria/__init__.py b/erpnext/schools/doctype/evaluation_criteria/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/schools/doctype/evaluation_criteria/__init__.py
+++ /dev/null
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_records.json b/erpnext/schools/doctype/evaluation_criteria/test_records.json
deleted file mode 100644
index 64ff701..0000000
--- a/erpnext/schools/doctype/evaluation_criteria/test_records.json
+++ /dev/null
@@ -1,8 +0,0 @@
-[
- {
-  "evaluation_criteria": "_Test Evaluation Criteria"
- }, 
- {
-  "evaluation_criteria": "_Test Evaluation Criteria 1"
- }
-]
\ No newline at end of file
diff --git a/erpnext/schools/doctype/grading_scale/grading_scale.py b/erpnext/schools/doctype/grading_scale/grading_scale.py
index f7f6ba9..4abff96 100644
--- a/erpnext/schools/doctype/grading_scale/grading_scale.py
+++ b/erpnext/schools/doctype/grading_scale/grading_scale.py
@@ -5,6 +5,7 @@
 from __future__ import unicode_literals
 import frappe
 from frappe import _
+from frappe.utils import cint
 from frappe.model.document import Document
 
 class GradingScale(Document):
@@ -12,8 +13,8 @@
 		thresholds = []
 		for d in self.intervals:
 			if d.threshold in thresholds:
-				frappe.throw(_("Treshold {0}% appears more than once.".format(d.threshold)))
+				frappe.throw(_("Treshold {0}% appears more than once".format(d.threshold)))
 			else:
-				thresholds.append(d.threshold)
+				thresholds.append(cint(d.threshold))
 		if 0 not in thresholds:
 			frappe.throw(_("Please define grade for treshold 0%"))
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student/student.json b/erpnext/schools/doctype/student/student.json
index 50efdc1..9595dfa 100644
--- a/erpnext/schools/doctype/student/student.json
+++ b/erpnext/schools/doctype/student/student.json
@@ -22,7 +22,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "First Name", 
@@ -50,7 +49,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Middle Name", 
@@ -78,7 +76,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Last Name", 
@@ -106,7 +103,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -133,7 +129,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Naming Series", 
@@ -162,7 +157,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Student Email Address", 
@@ -190,7 +184,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Student Mobile Number", 
@@ -220,7 +213,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "Joining Date", 
@@ -248,7 +240,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Image", 
@@ -278,7 +269,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Personal Details", 
@@ -306,7 +296,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Date of Birth", 
@@ -334,7 +323,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Blood Group", 
@@ -363,7 +351,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -390,7 +377,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Gender", 
@@ -419,7 +405,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Nationality", 
@@ -448,7 +433,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Student Applicant", 
@@ -477,7 +461,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Guardian Details", 
@@ -505,7 +488,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Guardians", 
@@ -534,7 +516,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Home Address", 
@@ -562,7 +543,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Address Line 1", 
@@ -590,7 +570,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Address Line 2", 
@@ -618,7 +597,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Pincode", 
@@ -646,7 +624,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -673,7 +650,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "City", 
@@ -701,7 +677,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "State", 
@@ -729,7 +704,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sibling Details", 
@@ -758,7 +732,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Siblings", 
@@ -788,7 +761,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Title", 
@@ -819,7 +791,7 @@
  "istable": 0, 
  "max_attachments": 0, 
  "menu_index": 0, 
- "modified": "2017-01-27 13:19:55.693540", 
+ "modified": "2017-02-03 05:07:48.915706", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Student", 
@@ -855,7 +827,7 @@
    "email": 1, 
    "export": 1, 
    "if_owner": 0, 
-   "import": 0, 
+   "import": 1, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
diff --git a/erpnext/schools/doctype/student/student.py b/erpnext/schools/doctype/student/student.py
index a34bb6a..b660bb3 100644
--- a/erpnext/schools/doctype/student/student.py
+++ b/erpnext/schools/doctype/student/student.py
@@ -5,9 +5,9 @@
 from __future__ import unicode_literals
 import frappe
 from frappe.model.document import Document
+from frappe import _
 
 class Student(Document):
-
 	def validate(self):
 		self.title = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name]))
 
@@ -19,7 +19,7 @@
 		"""Validates if the Student Applicant is Unique"""
 		student = frappe.db.sql("select name from `tabStudent` where student_applicant=%s and name!=%s", (self.student_applicant, self.name))
 		if student:
-			frappe.throw("Student {0} exist against student applicant {1}".format(student[0][0], self.student_applicant))
+			frappe.throw(_("Student {0} exist against student applicant {1}").format(student[0][0], self.student_applicant))
 
 	def update_applicant_status(self):
 		"""Updates Student Applicant status to Admitted"""
@@ -28,10 +28,9 @@
 
 def get_timeline_data(doctype, name):
 	'''Return timeline for attendance'''
-	return dict(frappe.db.sql('''select unix_timestamp(cs.schedule_date), count(*)
-		from `tabCourse Schedule` as cs , `tabStudent Attendance` as sa where
-			sa.course_schedule = cs.name
-			and sa.student=%s
-			and cs.schedule_date > date_sub(curdate(), interval 1 year)
+	return dict(frappe.db.sql('''select unix_timestamp(`date`), count(*)
+		from `tabStudent Attendance` where
+			student=%s
+			and `date` > date_sub(curdate(), interval 1 year)
 			and status = 'Present'
-			group by cs.schedule_date''', name))
+			group by date''', name))
diff --git a/erpnext/schools/doctype/student_attendance/student_attendance.py b/erpnext/schools/doctype/student_attendance/student_attendance.py
index e2d01b5..8e806e4 100644
--- a/erpnext/schools/doctype/student_attendance/student_attendance.py
+++ b/erpnext/schools/doctype/student_attendance/student_attendance.py
@@ -6,11 +6,15 @@
 import frappe
 from frappe.model.document import Document
 from frappe import _
+from erpnext.schools.api import get_student_batch_students, get_student_group_students
+
 
 class StudentAttendance(Document):
 	def validate(self):
 		self.validate_date()
 		self.validate_mandatory()
+		self.validate_course_schedule()
+		self.validate_student()
 		self.validate_duplication()
 		
 	def validate_date(self):
@@ -21,9 +25,27 @@
 		if not (self.student_batch or self.course_schedule):
 			frappe.throw(_("""Student Batch or Course Schedule is mandatory"""))
 	
+	def validate_course_schedule(self):
+		if self.course_schedule:
+			self.student_batch = frappe.db.get_value("Course Schedule", self.course_schedule, "student_batch")
+	
+	def validate_student(self):
+		if self.course_schedule:
+			student_group = frappe.db.get_value("Course Schedule", self.course_schedule, "student_group")
+			student_group_students = []
+			for d in get_student_group_students(student_group):
+				student_group_students.append(d.student)
+			if student_group and self.student not in student_group_students:
+				frappe.throw(_("""Student {0}: {1} does not belong to Student Group {2}""".format(self.student, self.student_name, student_group)))
+		else:
+			student_batch_students = []
+			for d in get_student_batch_students(self.student_batch):
+				student_batch_students.append(d.student)
+			if self.student not in student_batch_students:
+				frappe.throw(_("""Student {0}: {1} does not belong to Student Batch {2}""".format(self.student, self.student_name, self.student_batch)))
+
 	def validate_duplication(self):
 		"""Check if the Attendance Record is Unique"""
-		
 		attendance_records=None
 		if self.course_schedule:
 			attendance_records= frappe.db.sql("""select name from `tabStudent Attendance` where \
diff --git a/erpnext/schools/doctype/student_batch/student_batch.json b/erpnext/schools/doctype/student_batch/student_batch.json
index f571d9d..4909ff0 100644
--- a/erpnext/schools/doctype/student_batch/student_batch.json
+++ b/erpnext/schools/doctype/student_batch/student_batch.json
@@ -1,7 +1,7 @@
 {
  "allow_copy": 0, 
- "allow_import": 0, 
- "allow_rename": 0, 
+ "allow_import": 1, 
+ "allow_rename": 1, 
  "autoname": "", 
  "beta": 0, 
  "creation": "2016-07-21 15:49:53.776461", 
@@ -22,7 +22,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Student Batch Name", 
@@ -51,7 +50,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 1, 
    "label": "Academic Year", 
@@ -81,7 +79,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Active", 
@@ -109,7 +106,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -136,7 +132,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 1, 
    "label": "Program", 
@@ -165,7 +160,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 1, 
    "label": "Academic Term", 
@@ -194,7 +188,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Students", 
@@ -222,7 +215,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Students", 
@@ -251,7 +243,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Instructors", 
@@ -279,7 +270,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Instructors", 
@@ -309,7 +299,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-12-01 13:18:12.024001", 
+ "modified": "2017-02-03 05:19:35.037148", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Student Batch", 
@@ -325,8 +315,7 @@
    "email": 1, 
    "export": 1, 
    "if_owner": 0, 
-   "import": 0, 
-   "is_custom": 0, 
+   "import": 1, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -347,7 +336,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 0, 
    "read": 1, 
@@ -365,5 +353,6 @@
  "sort_field": "modified", 
  "sort_order": "DESC", 
  "title_field": "", 
+ "track_changes": 0, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/schools/doctype/student_batch_student/student_batch_student.json b/erpnext/schools/doctype/student_batch_student/student_batch_student.json
index 558281b..3558cc8 100644
--- a/erpnext/schools/doctype/student_batch_student/student_batch_student.json
+++ b/erpnext/schools/doctype/student_batch_student/student_batch_student.json
@@ -20,7 +20,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "Student", 
@@ -49,7 +48,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -76,13 +74,12 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "Student Name", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "", 
+   "options": "student.title", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -106,7 +103,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 0, 
    "label": "Active", 
@@ -135,7 +131,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2017-01-27 14:47:21.125366", 
+ "modified": "2017-02-03 05:26:35.518004", 
  "modified_by": "Administrator", 
  "module": "Schools", 
  "name": "Student Batch Student", 
diff --git a/erpnext/schools/doctype/student_group/student_group.py b/erpnext/schools/doctype/student_group/student_group.py
index f604773..2f27957 100644
--- a/erpnext/schools/doctype/student_group/student_group.py
+++ b/erpnext/schools/doctype/student_group/student_group.py
@@ -7,6 +7,7 @@
 from frappe.model.document import Document
 from frappe import _
 from erpnext.schools.utils import validate_duplicate_student
+from erpnext.schools.api import get_student_batch_students
 
 class StudentGroup(Document):
 	def autoname(self):
@@ -29,6 +30,8 @@
 	def validate(self):
 		self.validate_strength()
 		self.validate_student_name()
+		if self.student_batch:
+			self.validate_student_batch()
 		validate_duplicate_student(self.students)
 
 	def validate_strength(self):
@@ -39,4 +42,10 @@
 		for d in self.students:
 			d.student_name = frappe.db.get_value("Student", d.student, "title")
 	
-	
\ No newline at end of file
+	def validate_student_batch(self):
+		student_batch_students = []
+		for d in get_student_batch_students(self.student_batch):
+			student_batch_students.append(d.student)
+		for d in self.students:
+			if d.student not in student_batch_students:
+				frappe.throw(_("""Student {0}: {1} does not belong to Student Batch {2}""".format(d.student, d.student_name, self.student_batch)))
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index 77cc624..81e17a6 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -23,7 +23,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Name and Type", 
@@ -52,7 +51,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Series", 
@@ -80,7 +78,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Full Name", 
@@ -109,7 +106,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Type", 
@@ -139,7 +135,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "From Lead", 
@@ -169,7 +164,6 @@
    "hidden": 1, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Image", 
@@ -192,42 +186,11 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
-   "default": "Active", 
-   "fieldname": "status", 
-   "fieldtype": "Select", 
-   "hidden": 1, 
-   "ignore_user_permissions": 0, 
-   "ignore_xss_filter": 0, 
-   "in_filter": 0, 
-   "in_list_view": 0, 
-   "in_standard_filter": 0, 
-   "label": "Status", 
-   "length": 0, 
-   "no_copy": 0, 
-   "options": "Active\nDormant\nOpen", 
-   "permlevel": 0, 
-   "precision": "", 
-   "print_hide": 1, 
-   "print_hide_if_no_value": 0, 
-   "read_only": 0, 
-   "remember_last_selected_value": 0, 
-   "report_hide": 0, 
-   "reqd": 0, 
-   "search_index": 0, 
-   "set_only_once": 0, 
-   "unique": 0
-  }, 
-  {
-   "allow_on_submit": 0, 
-   "bold": 0, 
-   "collapsible": 0, 
-   "columns": 0, 
    "fieldname": "column_break0", 
    "fieldtype": "Column Break", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -255,7 +218,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 1, 
    "in_list_view": 1, 
    "in_standard_filter": 1, 
    "label": "Customer Group", 
@@ -286,7 +248,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 1, 
    "in_standard_filter": 1, 
    "label": "Territory", 
@@ -316,7 +277,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Tax ID", 
@@ -345,7 +305,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Disabled", 
@@ -373,7 +332,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Currency and Price List", 
@@ -401,7 +359,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 1, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Billing Currency", 
@@ -429,7 +386,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 1, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Default Price List", 
@@ -457,7 +413,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -484,7 +439,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Print Language", 
@@ -514,7 +468,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Address and Contact", 
@@ -542,7 +495,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Address HTML", 
@@ -569,7 +521,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Website", 
@@ -596,7 +547,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "length": 0, 
@@ -623,7 +573,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Contact HTML", 
@@ -652,7 +601,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Accounting", 
@@ -681,7 +629,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Accounts", 
@@ -710,7 +657,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Credit Limit", 
@@ -738,7 +684,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Credit Days Based On", 
@@ -768,7 +713,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Credit Days", 
@@ -797,7 +741,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Credit Limit", 
@@ -828,7 +771,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "More Information", 
@@ -858,7 +800,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Customer Details", 
@@ -887,7 +828,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Is Frozen", 
@@ -916,7 +856,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Partner and Commission", 
@@ -945,7 +884,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 1, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Partner", 
@@ -975,7 +913,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Commission Rate", 
@@ -1005,7 +942,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Team", 
@@ -1033,7 +969,6 @@
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
-   "in_filter": 0, 
    "in_list_view": 0, 
    "in_standard_filter": 0, 
    "label": "Sales Team Details", 
@@ -1066,7 +1001,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-11-07 05:26:57.948263", 
+ "modified": "2017-02-01 12:00:06.045170", 
  "modified_by": "Administrator", 
  "module": "Selling", 
  "name": "Customer", 
@@ -1083,7 +1018,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1104,7 +1038,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 1, 
    "print": 0, 
    "read": 1, 
@@ -1125,7 +1058,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1146,7 +1078,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1167,7 +1098,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 1, 
    "print": 0, 
    "read": 1, 
@@ -1188,7 +1118,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1209,7 +1138,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1230,7 +1158,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1251,7 +1178,6 @@
    "export": 0, 
    "if_owner": 0, 
    "import": 0, 
-   "is_custom": 0, 
    "permlevel": 0, 
    "print": 1, 
    "read": 1, 
@@ -1269,5 +1195,6 @@
  "search_fields": "customer_name,customer_group,territory", 
  "sort_order": "ASC", 
  "title_field": "customer_name", 
+ "track_changes": 1, 
  "track_seen": 0
 }
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index e14cde0..e4101af 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -11,7 +11,6 @@
 from erpnext.utilities.transaction_base import TransactionBase
 from frappe.geo.address_and_contact import load_address_and_contact, delete_contact_and_address
 from erpnext.accounts.party import validate_party_accounts, get_timeline_data # keep this
-from erpnext.accounts.party_status import get_party_status
 from erpnext import get_default_currency
 
 class Customer(TransactionBase):
@@ -70,7 +69,6 @@
 		self.flags.is_new_doc = self.is_new()
 		self.flags.old_lead = self.lead_name
 		validate_party_accounts(self)
-		self.status = get_party_status(self)
 		self.validate_credit_limit_on_change()
 
 	def on_update(self):
diff --git a/erpnext/selling/doctype/customer/customer_list.js b/erpnext/selling/doctype/customer/customer_list.js
index 57cebd4..09c3e93 100644
--- a/erpnext/selling/doctype/customer/customer_list.js
+++ b/erpnext/selling/doctype/customer/customer_list.js
@@ -1,12 +1,3 @@
 frappe.listview_settings['Customer'] = {
-	add_fields: ["customer_name", "territory", "customer_group", "customer_type", 'status'],
-	get_indicator: function(doc) {
-		color = {
-			'Open': 'red',
-			'Active': 'green',
-			'Dormant': 'darkgrey'
-		}
-		return [__(doc.status), color[doc.status], "status,=," + doc.status];
-	}
-
+	add_fields: ["customer_name", "territory", "customer_group", "customer_type"],
 };
diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py
index 7a59dd7..36cc472 100644
--- a/erpnext/selling/doctype/quotation/test_quotation.py
+++ b/erpnext/selling/doctype/quotation/test_quotation.py
@@ -68,47 +68,6 @@
 		self.assertEquals(quotation.get("items")[0].rate, total_margin)
 		si.save()
 
-	def test_party_status_open(self):
-		from erpnext.selling.doctype.customer.test_customer import get_customer_dict
-
-		customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
-		quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
-		quotation.submit()
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
-		quotation.cancel()
-		quotation.delete()
-		customer.delete()
-
-	def test_party_status_close(self):
-		from erpnext.selling.doctype.customer.test_customer import get_customer_dict
-
-		customer = frappe.get_doc(get_customer_dict('Party Status Test')).insert()
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Active')
-
-		# open quotation
-		quotation = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
-		# close quotation (submit)
-		quotation.submit()
-
-		quotation1 = frappe.get_doc(get_quotation_dict(customer=customer.name)).insert()
-
-		# still open
-		self.assertEquals(frappe.db.get_value('Customer', customer.name, 'status'), 'Open')
-
-		quotation.cancel()
-		quotation.delete()
-
-		quotation1.delete()
-
-		customer.delete()
-
 test_records = frappe.get_test_records('Quotation')
 
 def get_quotation_dict(customer=None, item_code=None):
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 8a4a47c..f01e484 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -4,11 +4,23 @@
 {% include 'erpnext/selling/sales_common.js' %}
 
 frappe.ui.form.on("Sales Order", {
+	setup: function(frm) {
+		$.extend(frm.cscript, new erpnext.selling.SalesOrderController({frm: frm}));
+	},
 	onload: function(frm) {
 		erpnext.queries.setup_queries(frm, "Warehouse", function() {
 			return erpnext.queries.warehouse(frm.doc);
 		});
 
+		frm.set_query('project', function(doc, cdt, cdn) {
+			return {
+				query: "erpnext.controllers.queries.get_project_name",
+				filters: {
+					'customer': doc.customer
+				}
+			}
+		});
+
 		// formatter for material request item
 		frm.set_indicator_formatter('item_code',
 			function(doc) { return (doc.qty<=doc.delivered_qty) ? "green" : "orange" })
@@ -17,6 +29,7 @@
 
 erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend({
 	refresh: function(doc, dt, dn) {
+		var me = this;
 		this._super();
 		var allow_purchase = false;
 		var allow_delivery = false;
@@ -24,8 +37,8 @@
 		if(doc.docstatus==1) {
 			if(doc.status != 'Closed') {
 
-				for (var i in cur_frm.doc.items) {
-					var item = cur_frm.doc.items[i];
+				for (var i in this.frm.doc.items) {
+					var item = this.frm.doc.items[i];
 					if(item.delivered_by_supplier === 1 || item.supplier){
 						if(item.qty > flt(item.ordered_qty)
 							&& item.qty > flt(item.delivered_qty)) {
@@ -47,55 +60,69 @@
 				if (this.frm.has_perm("submit")) {
 					// close
 					if(flt(doc.per_delivered, 2) < 100 || flt(doc.per_billed) < 100) {
-							cur_frm.add_custom_button(__('Close'), this.close_sales_order, __("Status"))
+							this.frm.add_custom_button(__('Close'),
+								function() { me.close_sales_order() }, __("Status"))
 						}
 				}
 
 				// delivery note
 				if(flt(doc.per_delivered, 2) < 100 && ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1 && allow_delivery) {
-					cur_frm.add_custom_button(__('Delivery'), this.make_delivery_note, __("Make"));
-					cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
+					this.frm.add_custom_button(__('Delivery'),
+						function() { me.make_delivery_note() }, __("Make"));
+					this.frm.add_custom_button(__('Production Order'),
+						function() { me.make_production_order() }, __("Make"));
+
+					this.frm.page.set_inner_btn_group_as_primary(__("Make"));
 				}
 
 				// sales invoice
 				if(flt(doc.per_billed, 2) < 100) {
-					cur_frm.add_custom_button(__('Invoice'), this.make_sales_invoice, __("Make"));
+					this.frm.add_custom_button(__('Invoice'),
+						function() { me.make_sales_invoice() }, __("Make"));
 				}
 
 				// material request
 				if(!doc.order_type || ["Sales", "Shopping Cart"].indexOf(doc.order_type)!==-1
 					&& flt(doc.per_delivered, 2) < 100) {
-						cur_frm.add_custom_button(__('Material Request'), this.make_material_request, __("Make"));
+						this.frm.add_custom_button(__('Material Request'),
+							function() { me.make_material_request() }, __("Make"));
 				}
 
 				// make purchase order
 				if(flt(doc.per_delivered, 2) < 100 && allow_purchase) {
-					cur_frm.add_custom_button(__('Purchase Order'), cur_frm.cscript.make_purchase_order, __("Make"));
+					this.frm.add_custom_button(__('Purchase Order'),
+						function() { me.make_purchase_order() }, __("Make"));
 				}
 
+				// payment request
 				if(flt(doc.per_billed)==0) {
-					cur_frm.add_custom_button(__('Payment Request'), this.make_payment_request, __("Make"));
-					cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_payment_entry, __("Make"));
+					this.frm.add_custom_button(__('Payment Request'),
+						function() { me.make_payment_request() }, __("Make"));
+					this.frm.add_custom_button(__('Payment'),
+						function() { me.make_payment_entry() }, __("Make"));
 				}
 
 				// maintenance
 				if(flt(doc.per_delivered, 2) < 100 &&
 						["Sales", "Shopping Cart"].indexOf(doc.order_type)===-1) {
-					cur_frm.add_custom_button(__('Maintenance Visit'), this.make_maintenance_visit, __("Make"));
-					cur_frm.add_custom_button(__('Maintenance Schedule'), this.make_maintenance_schedule, __("Make"));
+					this.frm.add_custom_button(__('Maintenance Visit'),
+						function() { me.make_maintenance_visit() }, __("Make"));
+					this.frm.add_custom_button(__('Maintenance Schedule'),
+						function() { me.make_maintenance_schedule() }, __("Make"));
 				}
 
-
 			} else {
 				if (this.frm.has_perm("submit")) {
 					// un-close
-					cur_frm.add_custom_button(__('Re-open'), cur_frm.cscript['Unclose Sales Order'], __("Status"));
+					this.frm.add_custom_button(__('Re-open'), function() {
+						me.frm.cscript.update_status('Re-open', 'Draft')
+					}, __("Status"));
 				}
 			}
 		}
 
 		if (this.frm.doc.docstatus===0) {
-			cur_frm.add_custom_button(__('Quotation'),
+			this.frm.add_custom_button(__('Quotation'),
 				function() {
 					erpnext.utils.map_current_doc({
 						method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
@@ -103,9 +130,9 @@
 						get_query_filters: {
 							docstatus: 1,
 							status: ["!=", "Lost"],
-							order_type: cur_frm.doc.order_type,
-							customer: cur_frm.doc.customer || undefined,
-							company: cur_frm.doc.company
+							order_type: me.frm.doc.order_type,
+							customer: me.frm.doc.customer || undefined,
+							company: me.frm.doc.company
 						}
 					})
 				}, __("Get items from"));
@@ -114,6 +141,82 @@
 		this.order_type(doc);
 	},
 
+	make_production_order() {
+		var me = this;
+		this.frm.call({
+			doc: this.frm.doc,
+			method: 'get_production_order_items',
+			callback: function(r) {
+				if(!r.message.every(function(d) { return !!d.bom })) {
+					frappe.msgprint({
+						title: __('Production Order not created'),
+						message: __('No Items with Bill of Materials to Manufacture'),
+						indicator: 'orange'
+					});
+					return;
+				}
+				else if(!r.message.every(function(d) { return !!d.pending_qty })) {
+					frappe.msgprint({
+						title: __('Production Order not created'),
+						message: __('Production Order already created for all items with BOM'),
+						indicator: 'orange'
+					});
+					return;
+				} else {
+					var fields = [
+						{fieldtype:'Table', fieldname: 'items',
+							description: __('Select BOM and Qty for Production'),
+							fields: [
+								{fieldtype:'Read Only', fieldname:'item_code',
+									label: __('Item Code'), in_list_view:1},
+								{fieldtype:'Link', fieldname:'bom', options: 'BOM',
+									label: __('Select BOM'), in_list_view:1, get_query: function(doc) {
+										return {filters: {item: doc.item_code}};
+									}},
+								{fieldtype:'Float', fieldname:'pending_qty',
+									label: __('Qty'), in_list_view:1},
+							],
+							get_data: function() {
+								return r.message
+							}
+						}
+					]
+					var d = new frappe.ui.Dialog({
+						title: __('Select Items to Manufacture'),
+						fields: fields,
+						primary_action: function() {
+							data = d.get_values();
+							me.frm.call({
+								method: 'make_production_orders',
+								args: {
+									items: data,
+									company: me.frm.doc.company,
+									sales_order: me.frm.docname,
+									project: me.frm.project
+								},
+								freeze: true,
+								callback: function(r) {
+									if(r.message) {
+										frappe.msgprint({
+											message: __('Production Orders Created: {0}',
+												[r.message.map(function(d) {
+													return repl('<a href="#Form/Production Order/%(name)s">%(name)s</a>', {name:d})
+												}).join(', ')]),
+											indicator: 'green'
+										})
+									}
+									d.hide();
+								}
+							});
+						},
+						primary_action_label: __('Make')
+					});
+					d.show();
+				}
+			}
+		});
+	},
+
 	order_type: function() {
 		this.frm.toggle_reqd("delivery_date", this.frm.doc.order_type == "Sales");
 	},
@@ -125,39 +228,40 @@
 	make_material_request: function() {
 		frappe.model.open_mapped_doc({
 			method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
-			frm: cur_frm
+			frm: this.frm
 		})
 	},
 
 	make_delivery_note: function() {
 		frappe.model.open_mapped_doc({
 			method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
-			frm: cur_frm
+			frm: this.frm
 		})
 	},
 
 	make_sales_invoice: function() {
 		frappe.model.open_mapped_doc({
 			method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
-			frm: cur_frm
+			frm: this.frm
 		})
 	},
 
 	make_maintenance_schedule: function() {
 		frappe.model.open_mapped_doc({
 			method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule",
-			frm: cur_frm
+			frm: this.frm
 		})
 	},
 
 	make_maintenance_visit: function() {
 		frappe.model.open_mapped_doc({
 			method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit",
-			frm: cur_frm
+			frm: this.frm
 		})
 	},
 
 	make_purchase_order: function(){
+		var me = this;
 		var dialog = new frappe.ui.Dialog({
 			title: __("For Supplier"),
 			fields: [
@@ -165,7 +269,7 @@
 					"get_query": function () {
 						return {
 							query:"erpnext.selling.doctype.sales_order.sales_order.get_supplier",
-							filters: {'parent': cur_frm.doc.name}
+							filters: {'parent': me.frm.doc.name}
 						}
 					}, "reqd": 1 },
 				{"fieldtype": "Button", "label": __("Make Purchase Order"), "fieldname": "make_purchase_order", "cssClass": "btn-primary"},
@@ -180,7 +284,7 @@
 				type: "GET",
 				method: "erpnext.selling.doctype.sales_order.sales_order.make_purchase_order_for_drop_shipment",
 				args: {
-					"source_name": cur_frm.doc.name,
+					"source_name": me.frm.doc.name,
 					"for_supplier": args.supplier
 				},
 				freeze: true,
@@ -195,44 +299,25 @@
 		dialog.show();
 	},
 	close_sales_order: function(){
-		cur_frm.cscript.update_status("Close", "Closed")
+		this.frm.cscript.update_status("Close", "Closed")
+	},
+	update_status: function(label, status){
+		var doc = this.frm.doc;
+		frappe.ui.form.is_saving = true;
+		frappe.call({
+			method: "erpnext.selling.doctype.sales_order.sales_order.update_status",
+			args: {status: status, name: doc.name},
+			callback: function(r){
+				this.frm.reload_doc();
+			},
+			always: function() {
+				frappe.ui.form.is_saving = false;
+			}
+		});
+	},
+	on_submit: function(doc, cdt, cdn) {
+		if(cint(frappe.boot.notification_settings.sales_order)) {
+			this.frm.email_doc(frappe.boot.notification_settings.sales_order_message);
+		}
 	}
-
 });
-
-// for backward compatibility: combine new and previous states
-$.extend(cur_frm.cscript, new erpnext.selling.SalesOrderController({frm: cur_frm}));
-
-cur_frm.fields_dict['project'].get_query = function(doc, cdt, cdn) {
-	return {
-		query: "erpnext.controllers.queries.get_project_name",
-		filters: {
-			'customer': doc.customer
-		}
-	}
-}
-
-cur_frm.cscript.update_status = function(label, status){
-	var doc = cur_frm.doc;
-	frappe.ui.form.is_saving = true;
-	frappe.call({
-		method: "erpnext.selling.doctype.sales_order.sales_order.update_status",
-		args: {status: status, name: doc.name},
-		callback: function(r){
-			cur_frm.reload_doc();
-		},
-		always: function() {
-			frappe.ui.form.is_saving = false;
-		}
-	});
-}
-
-cur_frm.cscript['Unclose Sales Order'] = function() {
-	cur_frm.cscript.update_status('Re-open', 'Draft')
-}
-
-cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
-	if(cint(frappe.boot.notification_settings.sales_order)) {
-		cur_frm.email_doc(frappe.boot.notification_settings.sales_order_message);
-	}
-};
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index acae0e5..fdaadd8 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -304,6 +304,24 @@
 			self.indicator_color = "green"
 			self.indicator_title = _("Paid")
 
+	def get_production_order_items(self):
+		'''Returns items with BOM that already do not have a linked production order'''
+		items = []
+		for i in self.packed_items or self.items:
+			bom = frappe.get_all('BOM', dict(item=i.item_code, is_active=True),
+					order_by='is_default desc')
+			bom = bom[0].name if bom else None
+			items.append(dict(
+				item_code= i.item_code,
+				bom = bom,
+				warehouse = i.warehouse,
+				pending_qty= i.qty - flt(frappe.db.sql('''select sum(qty) from `tabProduction Order`
+					where production_item=%s and sales_order=%s''', (i.item_code, self.name))[0][0])
+			))
+
+		return items
+
+
 	def on_recurring(self, reference_doc):
 		mcount = month_map[reference_doc.recurring_type]
 		self.set("delivery_date", get_next_date(reference_doc.delivery_date, mcount,
@@ -442,7 +460,7 @@
 		target.amount = flt(source.amount) - flt(source.billed_amt)
 		target.base_amount = target.amount * flt(source_parent.conversion_rate)
 		target.qty = target.amount / flt(source.rate) if (source.rate and source.billed_amt) else source.qty
-		
+
 		item = frappe.db.get_value("Item", target.item_code, ["item_group", "selling_cost_center"], as_dict=1)
 		target.cost_center = frappe.db.get_value("Project", source_parent.project, "cost_center") \
 			or item.selling_cost_center \
@@ -653,6 +671,27 @@
 		})
 
 @frappe.whitelist()
+def make_production_orders(items, sales_order, company, project=None):
+	'''Make Production Orders against the given Sales Order for the given `items`'''
+	items = json.loads(items).get('items')
+	out = []
+
+	for i in items:
+		production_order = frappe.get_doc(dict(
+			doctype='Production Order',
+			production_item=i['item_code'],
+			bom_no=i['bom'],
+			qty=i['pending_qty'],
+			company=company,
+			sales_order=sales_order,
+			project=project,
+			fg_warehouse=i['warehouse']
+		)).insert()
+		out.append(production_order)
+
+	return [p.name for p in out]
+
+@frappe.whitelist()
 def update_status(status, name):
 	so = frappe.get_doc("Sales Order", name)
 	so.update_status(status)
diff --git a/erpnext/startup/notifications.py b/erpnext/startup/notifications.py
index a1b90f9..554243f 100644
--- a/erpnext/startup/notifications.py
+++ b/erpnext/startup/notifications.py
@@ -11,8 +11,6 @@
 			"Task": {"status": "Overdue"},
 			"Project": {"status": "Open"},
 			"Item": {"total_projected_qty": ("<", 0)},
-			"Customer": {"status": "Open"},
-			"Supplier": {"status": "Open"},
 			"Lead": {"status": "Open"},
 			"Contact": {"status": "Open"},
 			"Opportunity": {"status": "Open"},
@@ -23,11 +21,11 @@
 			},
 			"Journal Entry": {"docstatus": 0},
 			"Sales Invoice": {
-				"outstanding_amount": (">", 0), 
-				"docstatus": ("<", 2) 
+				"outstanding_amount": (">", 0),
+				"docstatus": ("<", 2)
 			},
 			"Purchase Invoice": {
-				"outstanding_amount": (">", 0), 
+				"outstanding_amount": (">", 0),
 				"docstatus": ("<", 2)
 			},
 			"Payment Entry": {"docstatus": 0},
diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
index e1ac06e..1147d8d 100644
--- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
+++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json
@@ -1477,6 +1477,34 @@
    "width": "120px"
   }, 
   {
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "is_sample_item", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Is Sample Item", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -1691,7 +1719,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-12-24 12:33:37.728117", 
+ "modified": "2017-02-07 01:22:03.047137", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Delivery Note Item", 
diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
index d8449f1..5903713 100755
--- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
+++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json
@@ -1575,6 +1575,34 @@
    "unique": 0
   }, 
   {
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
+   "fieldname": "is_sample_item", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Is Sample Item", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
    "allow_on_submit": 0, 
    "bold": 0, 
    "collapsible": 0, 
@@ -1885,7 +1913,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-11-16 16:04:21.778869", 
+ "modified": "2017-02-07 01:21:36.348032", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Purchase Receipt Item", 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index b410802..37f9b68 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -41,6 +41,10 @@
 				}
 			}
 		}
+
+		this.frm.set_indicator_formatter('item_code',
+			function(doc) { return (doc.qty<=doc.actual_qty) ? "green" : "orange" })
+
 	},
 
 	onload_post_render: function() {
diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
index ed1843e..34b3c85 100644
--- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
+++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json
@@ -10,6 +10,7 @@
  "doctype": "DocType", 
  "document_type": "Other", 
  "editable_grid": 1, 
+ "engine": "InnoDB", 
  "fields": [
   {
    "allow_on_submit": 0, 
@@ -23,6 +24,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Barcode", 
    "length": 0, 
    "no_copy": 0, 
@@ -50,6 +52,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -76,6 +79,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 1, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Source Warehouse", 
    "length": 0, 
    "no_copy": 0, 
@@ -105,6 +109,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -130,6 +135,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 1, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Target Warehouse", 
    "length": 0, 
    "no_copy": 0, 
@@ -159,6 +165,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -184,6 +191,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 1, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Item Code", 
    "length": 0, 
    "no_copy": 0, 
@@ -213,6 +221,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -238,6 +247,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Item Name", 
    "length": 0, 
    "no_copy": 0, 
@@ -264,6 +274,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Description", 
    "length": 0, 
    "no_copy": 0, 
@@ -291,6 +302,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Description", 
    "length": 0, 
    "no_copy": 0, 
@@ -321,6 +333,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -347,6 +360,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Image", 
    "length": 0, 
    "no_copy": 0, 
@@ -374,6 +388,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Image View", 
    "length": 0, 
    "no_copy": 0, 
@@ -402,6 +417,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Quantity and Rate", 
    "length": 0, 
    "no_copy": 0, 
@@ -420,7 +436,7 @@
    "allow_on_submit": 0, 
    "bold": 1, 
    "collapsible": 0, 
-   "columns": 1, 
+   "columns": 3, 
    "fieldname": "qty", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -428,6 +444,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 1, 
+   "in_standard_filter": 0, 
    "label": "Qty", 
    "length": 0, 
    "no_copy": 0, 
@@ -448,14 +465,15 @@
    "allow_on_submit": 0, 
    "bold": 1, 
    "collapsible": 0, 
-   "columns": 2, 
+   "columns": 0, 
    "fieldname": "basic_rate", 
    "fieldtype": "Currency", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
-   "in_list_view": 1, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Basic Rate (as per Stock UOM)", 
    "length": 0, 
    "no_copy": 0, 
@@ -485,6 +503,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Basic Amount", 
    "length": 0, 
    "no_copy": 0, 
@@ -513,6 +532,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Additional Cost", 
    "length": 0, 
    "no_copy": 0, 
@@ -541,6 +561,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Amount", 
    "length": 0, 
    "no_copy": 0, 
@@ -570,6 +591,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Valuation Rate", 
    "length": 0, 
    "no_copy": 0, 
@@ -598,6 +620,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -623,6 +646,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "UOM", 
    "length": 0, 
    "no_copy": 0, 
@@ -652,6 +676,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Conversion Factor", 
    "length": 0, 
    "no_copy": 0, 
@@ -680,6 +705,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Stock UOM", 
    "length": 0, 
    "no_copy": 0, 
@@ -709,6 +735,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Qty as per Stock UOM", 
    "length": 0, 
    "no_copy": 0, 
@@ -737,6 +764,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Serial No / Batch", 
    "length": 0, 
    "no_copy": 0, 
@@ -763,6 +791,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Serial No", 
    "length": 0, 
    "no_copy": 1, 
@@ -791,6 +820,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -816,6 +846,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Batch No", 
    "length": 0, 
    "no_copy": 0, 
@@ -845,6 +876,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Accounting", 
    "length": 0, 
    "no_copy": 0, 
@@ -872,6 +904,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Difference Account", 
    "length": 0, 
    "no_copy": 0, 
@@ -899,6 +932,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -926,6 +960,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Cost Center", 
    "length": 0, 
    "no_copy": 0, 
@@ -953,6 +988,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "More Information", 
    "length": 0, 
    "no_copy": 0, 
@@ -972,6 +1008,34 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
+   "fieldname": "is_sample_item", 
+   "fieldtype": "Check", 
+   "hidden": 0, 
+   "ignore_user_permissions": 0, 
+   "ignore_xss_filter": 0, 
+   "in_filter": 0, 
+   "in_list_view": 0, 
+   "in_standard_filter": 0, 
+   "label": "Is Sample Item", 
+   "length": 0, 
+   "no_copy": 1, 
+   "permlevel": 0, 
+   "precision": "", 
+   "print_hide": 1, 
+   "print_hide_if_no_value": 0, 
+   "read_only": 0, 
+   "remember_last_selected_value": 0, 
+   "report_hide": 0, 
+   "reqd": 0, 
+   "search_index": 0, 
+   "set_only_once": 0, 
+   "unique": 0
+  }, 
+  {
+   "allow_on_submit": 1, 
+   "bold": 0, 
+   "collapsible": 0, 
+   "columns": 0, 
    "fieldname": "actual_qty", 
    "fieldtype": "Float", 
    "hidden": 0, 
@@ -979,6 +1043,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 1, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Actual Qty (at source/target)", 
    "length": 0, 
    "no_copy": 1, 
@@ -1008,6 +1073,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "BOM No", 
    "length": 0, 
    "no_copy": 0, 
@@ -1035,6 +1101,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "length": 0, 
    "no_copy": 0, 
    "permlevel": 0, 
@@ -1061,6 +1128,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Material Request", 
    "length": 0, 
    "no_copy": 1, 
@@ -1088,6 +1156,7 @@
    "ignore_xss_filter": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
+   "in_standard_filter": 0, 
    "label": "Material Request Item", 
    "length": 0, 
    "no_copy": 1, 
@@ -1114,7 +1183,7 @@
  "issingle": 0, 
  "istable": 1, 
  "max_attachments": 0, 
- "modified": "2016-11-27 15:19:26.597414", 
+ "modified": "2017-02-07 01:21:14.367586", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Stock Entry Detail", 
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 0f1e30d..b9b11a8 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -73,7 +73,7 @@
 
 	out.update(get_pricing_rule_for_item(args))
 
-	if args.get("doctype") in ("Sales Invoice", "Delivery Note"):
+	if args.get("doctype") in ("Sales Invoice", "Delivery Note") and out.qty > 0:
 		out.serial_no = get_serial_no(out)
 
 	if args.transaction_date and item.lead_time_days:
@@ -387,7 +387,8 @@
 def get_bin_details_and_serial_nos(item_code, warehouse, qty=None, serial_no=None):
 	bin_details_and_serial_nos = {}
 	bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse))
-	bin_details_and_serial_nos.update(get_serial_no_details(item_code, warehouse, qty, serial_no))
+	if qty > 0:
+		bin_details_and_serial_nos.update(get_serial_no_details(item_code, warehouse, qty, serial_no))
 	return bin_details_and_serial_nos
 
 @frappe.whitelist()
diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py
index a4cc512..10722cc 100644
--- a/erpnext/stock/stock_ledger.py
+++ b/erpnext/stock/stock_ledger.py
@@ -258,11 +258,14 @@
 
 			if not self.valuation_rate and actual_qty > 0:
 				self.valuation_rate = sle.incoming_rate
+				
+			# Get valuation rate from previous SLE or Item master, if item is not a sample item
+			if not self.valuation_rate and sle.voucher_detail_no:
+				is_sample_item = self.check_if_sample_item(sle.voucher_type, sle.voucher_detail_no)
+				if not is_sample_item:
+					self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, 
+						sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
 		
-		if not self.valuation_rate:
-			self.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, 
-				sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
-
 	def get_fifo_values(self, sle):
 		incoming_rate = flt(sle.incoming_rate)
 		actual_qty = flt(sle.actual_qty)
@@ -286,8 +289,13 @@
 			while qty_to_pop:
 				if not self.stock_queue:
 					# Get valuation rate from last sle if exists or from valuation rate field in item master
-					_rate = get_valuation_rate(sle.item_code, sle.warehouse, 
-				sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
+					is_sample_item = self.check_if_sample_item(sle.voucher_type, sle.voucher_detail_no)
+					if not is_sample_item:
+						_rate = get_valuation_rate(sle.item_code, sle.warehouse, 
+							sle.voucher_type, sle.voucher_no, self.allow_zero_rate)
+					else:
+						_rate = 0
+						
 					self.stock_queue.append([0, _rate])
 
 				index = None
@@ -333,7 +341,11 @@
 
 		if not self.stock_queue:
 			self.stock_queue.append([0, sle.incoming_rate or sle.outgoing_rate or self.valuation_rate])
-
+			
+	def check_if_sample_item(self, voucher_type, voucher_detail_no):
+		ref_item_dt = voucher_type + (" Detail" if voucher_type == "Stock Entry" else " Item")
+		return frappe.db.get_value(ref_item_dt, voucher_detail_no, "is_sample_item")
+		
 	def get_sle_before_datetime(self):
 		"""get previous stock ledger entry before current time-bucket"""
 		return get_stock_ledger_entries(self.args, "<", "desc", "limit 1", for_update=False)
@@ -432,7 +444,6 @@
 	if not allow_zero_rate and not valuation_rate \
 			and cint(frappe.db.get_value("Accounts Settings", None, "auto_accounting_for_stock")):
 			
-		frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries (for booking expenses). Please create an incoming stock transaction or mention valuation rate in Item record, and then try submiting {1} {2}")
-		.format(item_code, voucher_type, voucher_no))
+		frappe.throw(_("Valuation rate not found for the Item {0}, which is required to do accounting entries for {1} {2}. If the item is transacting as a sample item in the {1}, please mention that in the {1} Item table. Otherwise, please create an incoming stock transaction for the item or mention valuation rate in the Item record, and then try submiting/cancelling this entry").format(item_code, voucher_type, voucher_no))
 
 	return valuation_rate
diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py
index f2d8bd5..e5c6ee1 100644
--- a/erpnext/support/doctype/issue/issue.py
+++ b/erpnext/support/doctype/issue/issue.py
@@ -81,9 +81,15 @@
 	st.save()
 
 def auto_close_tickets():
-	frappe.db.sql("""update `tabIssue` set status = 'Closed'
-		where status = 'Replied'
-		and date_sub(curdate(),interval 15 Day) > modified""")
+	issues = frappe.db.get_all("Issue", filters={
+		"status": "Replied",
+		"modified": ("<", "date_sub(curdate(),interval 7 Day)")
+	}, fields=["name"])
+
+	for issue in issues:
+		doc = frappe.get_doc("Issue", issue.get("name"))
+		doc.status = "Closed"
+		doc.save(ignore_permissions=True)
 
 @frappe.whitelist()
 def set_multiple_status(names, status):