Disabled property set only once for has serial no and has batch no field in item doctype
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index aed6f41..4e61bd9 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -106,6 +106,13 @@
 				frappe.set_route("Form", "Item Variant Settings");
 			}, __("View"));
 		}
+
+		const stock_exists = (frm.doc.__onload
+			&& frm.doc.__onload.stock_exists) ? 1 : 0;
+
+		['has_serial_no', 'has_batch_no'].forEach((fieldname) => {
+			frm.set_df_property(fieldname, 'read_only', stock_exists);
+		});
 	},
 
 	validate: function(frm){
diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json
index 7d18dd6..7fa4b53 100644
--- a/erpnext/stock/doctype/item/item.json
+++ b/erpnext/stock/doctype/item/item.json
@@ -1180,7 +1180,7 @@
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
-   "set_only_once": 1, 
+   "set_only_once": 0, 
    "unique": 0
   }, 
   {
@@ -1370,7 +1370,7 @@
    "report_hide": 0, 
    "reqd": 0, 
    "search_index": 0, 
-   "set_only_once": 1, 
+   "set_only_once": 0, 
    "unique": 0
   }, 
   {
@@ -3453,7 +3453,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 1, 
- "modified": "2017-12-27 15:47:17.039337", 
+ "modified": "2018-01-23 12:21:16.641517", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Item",