diff --git a/stock/doctype/serial_no/serial_no.js b/stock/doctype/serial_no/serial_no.js index 32620ddab0..a41113c313 100644 --- a/stock/doctype/serial_no/serial_no.js +++ b/stock/doctype/serial_no/serial_no.js @@ -7,15 +7,16 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { // ************************************** 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