Merge pull request #7609 from rmehta/remove-party-status

Remove Party Status
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/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/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/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/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/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py
index 411f597..a268ea2 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/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/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/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/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},