Merge pull request #25107 from deepeshgarg007/stock_entry_serial_batch_selector

fix: Hide serial and batch selector in Stock Entry
This commit is contained in:
Deepesh Garg 2021-04-03 17:15:22 +05:30 committed by GitHub
commit 232c127295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,13 @@ frappe.ui.form.on('Stock Entry', {
frm.add_fetch("bom_no", "inspection_required", "inspection_required");
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
frappe.db.get_single_value('Stock Settings', 'disable_serial_no_and_batch_selector')
.then((value) => {
if (value) {
frappe.flags.hide_serial_batch_dialog = true;
}
});
},
setup_quality_inspection: function(frm) {
@ -721,7 +728,7 @@ frappe.ui.form.on('Stock Entry Detail', {
no_batch_serial_number_value = !d.batch_no;
}
if (no_batch_serial_number_value) {
if (no_batch_serial_number_value && !frappe.flags.hide_serial_batch_dialog) {
erpnext.stock.select_batch_and_serial_no(frm, d);
}
}