diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 0a363a04fd..ffc5e6ad36 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -60,7 +60,15 @@ $.extend(erpnext, { var me = this; $btn.on("click", function() { - me.show_serial_batch_selector(grid_row.frm, grid_row.doc); + let callback = ''; + let on_close = ''; + + if (grid_row.doc.serial_no) { + grid_row.doc.has_serial_no = true; + } + + me.show_serial_batch_selector(grid_row.frm, grid_row.doc, + callback, on_close, true); }); }, });