[Minor]Changed CustomerDisabled and CustomerFrozen to PartyDisabled and PartyFrozen
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index 691ee46..70e141b 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -10,7 +10,7 @@
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff
from erpnext.utilities.doctype.address.address import get_address_display
from erpnext.utilities.doctype.contact.contact import get_contact_details
-from erpnext.exceptions import CustomerFrozen, InvalidCurrency, CustomerDisabled, InvalidAccountCurrency
+from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
class DuplicatePartyAccountError(frappe.ValidationError): pass
@@ -314,7 +314,7 @@
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if not frozen_accounts_modifier in frappe.get_roles():
if frappe.db.get_value(party_type, party, "is_frozen"):
- frappe.throw("{0} {1} is frozen".format(party_type, party), CustomerFrozen)
+ frappe.throw("{0} {1} is frozen".format(party_type, party), PartyFrozen)
if frappe.db.get_value(party_type, party, "disabled"):
- frappe.throw("{0} {1} is disabled".format(party_type, party), CustomerDisabled)
+ frappe.throw("{0} {1} is disabled".format(party_type, party), PartyDisabled)
diff --git a/erpnext/buying/doctype/supplier/test_supplier.py b/erpnext/buying/doctype/supplier/test_supplier.py
index cc551ac..a7a65f1 100644
--- a/erpnext/buying/doctype/supplier/test_supplier.py
+++ b/erpnext/buying/doctype/supplier/test_supplier.py
@@ -5,7 +5,7 @@
import frappe, unittest
from erpnext.accounts.party import get_due_date
-from erpnext.exceptions import CustomerFrozen, CustomerDisabled
+from erpnext.exceptions import PartyFrozen, PartyDisabled
from frappe.test_runner import make_test_records
test_records = frappe.get_test_records('Supplier')
@@ -65,7 +65,7 @@
po = create_purchase_order(do_not_save=True)
- self.assertRaises(CustomerDisabled, po.save)
+ self.assertRaises(PartyDisabled, po.save)
frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 0)
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 12df9a7..d6eff1c 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -11,7 +11,7 @@
from erpnext.controllers.recurring_document import convert_to_recurring, validate_recurring_document
from erpnext.controllers.sales_and_purchase_return import validate_return
from erpnext.accounts.party import get_party_account_currency, validate_party_frozen_disabled
-from erpnext.exceptions import CustomerFrozen, InvalidCurrency, CustomerDisabled
+from erpnext.exceptions import InvalidCurrency
force_item_fields = ("item_group", "barcode", "brand", "stock_uom")
diff --git a/erpnext/exceptions.py b/erpnext/exceptions.py
index 808523b..d92af5d 100644
--- a/erpnext/exceptions.py
+++ b/erpnext/exceptions.py
@@ -2,7 +2,7 @@
import frappe
# accounts
-class CustomerFrozen(frappe.ValidationError): pass
+class PartyFrozen(frappe.ValidationError): pass
class InvalidAccountCurrency(frappe.ValidationError): pass
class InvalidCurrency(frappe.ValidationError): pass
-class CustomerDisabled(frappe.ValidationError):pass
+class PartyDisabled(frappe.ValidationError):pass
diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py
index 27db774..53fcb1e 100644
--- a/erpnext/selling/doctype/customer/test_customer.py
+++ b/erpnext/selling/doctype/customer/test_customer.py
@@ -7,7 +7,7 @@
import unittest
from frappe.test_runner import make_test_records
-from erpnext.exceptions import CustomerFrozen, CustomerDisabled
+from erpnext.exceptions import PartyFrozen, PartyDisabled
test_ignore = ["Price List"]
@@ -76,7 +76,7 @@
so = make_sales_order(do_not_save= True)
- self.assertRaises(CustomerFrozen, so.save)
+ self.assertRaises(PartyFrozen, so.save)
frappe.db.set_value("Customer", "_Test Customer", "is_frozen", 0)
@@ -91,7 +91,7 @@
so = make_sales_order(do_not_save=True)
- self.assertRaises(CustomerDisabled, so.save)
+ self.assertRaises(PartyDisabled, so.save)
frappe.db.set_value("Customer", "_Test Customer", "disabled", 0)