diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index 74e832482df..297012d78fe 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -269,9 +269,10 @@ erpnext.SerialNoBatchSelector = Class.extend({ 'qty', this.values.warehouse); } else if (!this.batch_exists(batch_no)) { row = this.frm.add_child("items", { ...this.item }); - row.batch_no = batch_no; + frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); } else { row = this.frm.doc.items.find(i => i.batch_no === batch_no); + frappe.model.set_value(row.doctype, row.name, 'batch_no', batch_no); } const values = { 'qty': serial_no.length,