Set status button in serial no
diff --git a/erpnext/stock/doctype/serial_no/serial_no.js b/erpnext/stock/doctype/serial_no/serial_no.js
index f7c484b..dce9d45 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.js
+++ b/erpnext/stock/doctype/serial_no/serial_no.js
@@ -19,10 +19,8 @@
frm.toggle_enable("item_code", frm.doc.__islocal);
if(frm.doc.status == "Sales Returned" && frm.doc.warehouse)
- cur_frm.add_custom_button(__('Set Status as Available'), cur_frm.cscript.set_status_as_available);
+ cur_frm.add_custom_button(__('Set Status as Available'), function() {
+ cur_frm.set_value("status", "Available");
+ cur_frm.save();
+ });
});
-
-cur_frm.cscript.set_status_as_available = function() {
- cur_frm.set_value("status", "Available");
- cur_frm.save()
-}