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.
This commit is contained in:
parent
8fbf10f5db
commit
9dfc0f32ab
@ -455,3 +455,4 @@ erpnext.patches.v9_0.add_healthcare_domain
|
|||||||
erpnext.patches.v9_0.set_variant_item_description
|
erpnext.patches.v9_0.set_variant_item_description
|
||||||
erpnext.patches.v9_0.set_uoms_in_variant_field
|
erpnext.patches.v9_0.set_uoms_in_variant_field
|
||||||
erpnext.patches.v9_0.copy_old_fees_field_data
|
erpnext.patches.v9_0.copy_old_fees_field_data
|
||||||
|
erpnext.patches.v9_0.set_bypasscreditlimitcheckatsalesorder_in_customer
|
||||||
|
@ -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)""")
|
@ -913,6 +913,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"default": "0",
|
||||||
"fieldname": "bypass_credit_limit_check_at_sales_order",
|
"fieldname": "bypass_credit_limit_check_at_sales_order",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -1232,7 +1233,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2017-10-24 14:44:48.508334",
|
"modified": "2017-10-26 16:21:18.028471",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Customer",
|
"name": "Customer",
|
||||||
|
@ -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()
|
|
||||||
]);
|
|
||||||
|
|
||||||
});
|
|
Loading…
Reference in New Issue
Block a user