customer.json -- a checkbox field is added which gives user ability to bypass credit limit check at sales order level for a customer. It is default to 0. Also patch is added to update value of new field to 0 after migrate.
test_customer.js -- It is auto generated file as customer.json is modified. And it is removed.
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index fd7a1b4..41999a9 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -455,3 +455,4 @@
erpnext.patches.v9_0.set_variant_item_description
erpnext.patches.v9_0.set_uoms_in_variant_field
erpnext.patches.v9_0.copy_old_fees_field_data
+erpnext.patches.v9_0.set_bypasscreditlimitcheckatsalesorder_in_customer
diff --git a/erpnext/patches/v9_0/set_bypasscreditlimitcheckatsalesorder_in_customer.py b/erpnext/patches/v9_0/set_bypasscreditlimitcheckatsalesorder_in_customer.py
new file mode 100644
index 0000000..e94a508
--- /dev/null
+++ b/erpnext/patches/v9_0/set_bypasscreditlimitcheckatsalesorder_in_customer.py
@@ -0,0 +1,10 @@
+import frappe
+
+def execute():
+ frappe.reload_doctype("Customer")
+
+ if "bypass_credit_limit_check_at_sales_order" in frappe.db.get_table_columns("Customer"):
+ frappe.db.sql("""
+ update `tabCustomer`
+ set bypass_credit_limit_check_at_sales_order = 0
+ where (bypass_credit_limit_check_at_sales_order is NULL)""")
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json
index f231b85..24b1968 100644
--- a/erpnext/selling/doctype/customer/customer.json
+++ b/erpnext/selling/doctype/customer/customer.json
@@ -913,6 +913,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
+ "default": "0",
"fieldname": "bypass_credit_limit_check_at_sales_order",
"fieldtype": "Check",
"hidden": 0,
@@ -1232,7 +1233,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-10-24 14:44:48.508334",
+ "modified": "2017-10-26 16:21:18.028471",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",
diff --git a/erpnext/selling/doctype/customer/test_customer.js b/erpnext/selling/doctype/customer/test_customer.js
deleted file mode 100644
index 65b81af..0000000
--- a/erpnext/selling/doctype/customer/test_customer.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/* eslint-disable */
-// rename this file from _test_[name] to test_[name] to activate
-// and remove above this line
-
-QUnit.test("test: Customer", function (assert) {
- let done = assert.async();
-
- // number of asserts
- assert.expect(1);
-
- frappe.run_serially([
- // insert a new Customer
- () => frappe.tests.make('Customer', [
- // values to be set
- {key: 'value'}
- ]),
- () => {
- assert.equal(cur_frm.doc.key, 'value');
- },
- () => done()
- ]);
-
-});