Made some fields read only after saving
diff --git a/stock/doctype/serial_no/serial_no.js b/stock/doctype/serial_no/serial_no.js
index 32620dd..a41113c 100644
--- a/stock/doctype/serial_no/serial_no.js
+++ b/stock/doctype/serial_no/serial_no.js
@@ -7,15 +7,16 @@
 
 // ************************************** refresh ***************************************************
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-  if(!doc.__islocal && doc.warehouse) set_field_permlevel('warehouse', 1);
-  if(!doc.__islocal && doc.item_code) set_field_permlevel('item_code', 1);
-  if(doc.__islocal) set_field_permlevel('status', 0);
+  if(!doc.__islocal) {
+    flds = ['item_code', 'warehouse', 'purchase_document_type', 'purchase_document_no', 'purchase_date', 'purchase_time', 'purchase_rate', 'supplier']
+    for(i=0;i<flds.length;i++) 
+      set_field_permlevel(flds[i], 1);
+  }
 }
 
 
 // ************************************** triggers **************************************************
 
-// -------------
 // item details
 // -------------
 cur_frm.add_fetch('item_code', 'item_name', 'item_name')
@@ -24,23 +25,12 @@
 cur_frm.add_fetch('item_code', 'description', 'description')
 cur_frm.add_fetch('item_code', 'warranty_period', 'warranty_period')
 
-
-// ---------
 // customer
 // ---------
 cur_frm.add_fetch('customer', 'customer_name', 'customer_name')
 cur_frm.add_fetch('customer', 'address', 'delivery_address')
 cur_frm.add_fetch('customer', 'territory', 'territory')
 
-
-// ---------
-// supplier
-// ---------
-//cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name')
-//cur_frm.add_fetch('customer', 'address', 'supplier_address')
-
-
-// ----------
 // territory
 // ----------
 cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
@@ -48,10 +38,8 @@
 }
 
 // Supplier
+//-------------
 cur_frm.cscript.supplier = function(doc,dt,dn) {
   if(doc.supplier) get_server_fields('get_default_supplier_address', JSON.stringify({supplier: doc.supplier}),'', doc, dt, dn, 1);
   if(doc.supplier) unhide_field(['supplier_name','address_display']);
 }
-
-
-