From 1fd17a9a67d561ab53a2e5812d73bdb61a3244f1 Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Thu, 3 Aug 2017 10:18:43 +0530 Subject: [PATCH] [Minor] Country field name should be country --- .../doctype/manufacturer/manufacturer.js | 8 +++++++ .../doctype/manufacturer/manufacturer.json | 13 ++++++++--- .../doctype/manufacturer/test_manufacturer.js | 23 +++++++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 erpnext/stock/doctype/manufacturer/manufacturer.js create mode 100644 erpnext/stock/doctype/manufacturer/test_manufacturer.js diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.js b/erpnext/stock/doctype/manufacturer/manufacturer.js new file mode 100644 index 00000000000..67df1bf4c0b --- /dev/null +++ b/erpnext/stock/doctype/manufacturer/manufacturer.js @@ -0,0 +1,8 @@ +// Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Manufacturer', { + refresh: function(frm) { + + } +}); diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.json b/erpnext/stock/doctype/manufacturer/manufacturer.json index 4e1da106278..50259178364 100644 --- a/erpnext/stock/doctype/manufacturer/manufacturer.json +++ b/erpnext/stock/doctype/manufacturer/manufacturer.json @@ -1,5 +1,6 @@ { "allow_copy": 0, + "allow_guest_to_view": 0, "allow_import": 1, "allow_rename": 1, "autoname": "field:short_name", @@ -13,6 +14,7 @@ "editable_grid": 0, "fields": [ { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -43,6 +45,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -72,6 +75,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -101,11 +105,12 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "data_6", + "fieldname": "country", "fieldtype": "Link", "hidden": 0, "ignore_user_permissions": 0, @@ -131,6 +136,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -160,6 +166,7 @@ "unique": 0 }, { + "allow_bulk_edit": 0, "allow_on_submit": 0, "bold": 0, "collapsible": 0, @@ -189,18 +196,18 @@ "unique": 0 } ], + "has_web_view": 0, "hide_heading": 0, "hide_toolbar": 0, "icon": "fa fa-certificate", "idx": 0, "image_view": 0, "in_create": 0, - "in_dialog": 0, "is_submittable": 0, "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2017-02-20 13:28:13.374242", + "modified": "2017-08-03 06:27:57.182666", "modified_by": "Administrator", "module": "Stock", "name": "Manufacturer", diff --git a/erpnext/stock/doctype/manufacturer/test_manufacturer.js b/erpnext/stock/doctype/manufacturer/test_manufacturer.js new file mode 100644 index 00000000000..0254a367ccb --- /dev/null +++ b/erpnext/stock/doctype/manufacturer/test_manufacturer.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: Manufacturer", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially('Manufacturer', [ + // insert a new Manufacturer + () => frappe.tests.make([ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +});