From 06e6a82d56faf45212fc293334360a1390f326d3 Mon Sep 17 00:00:00 2001 From: ashish Date: Wed, 25 Oct 2017 15:56:39 +0530 Subject: [PATCH] customer.json -- a checkbox field is added which gives user ability to bypass credit limit check at sales order level for a customer. test_customer.js : auto generated file as customer.json is modified --- .../selling/doctype/customer/customer.json | 32 ++++++++++++++++++- .../selling/doctype/customer/test_customer.js | 23 +++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 erpnext/selling/doctype/customer/test_customer.js diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index 52c6b6db862..f231b85c650 100644 --- a/erpnext/selling/doctype/customer/customer.json +++ b/erpnext/selling/doctype/customer/customer.json @@ -907,6 +907,36 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bypass_credit_limit_check_at_sales_order", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bypass credit limit check at Sales Order", + "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_bulk_edit": 0, "allow_on_submit": 0, @@ -1202,7 +1232,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-07-24 00:55:07.445783", + "modified": "2017-10-24 14:44:48.508334", "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 new file mode 100644 index 00000000000..65b81af32c1 --- /dev/null +++ b/erpnext/selling/doctype/customer/test_customer.js @@ -0,0 +1,23 @@ +/* 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() + ]); + +});