fix(stock): add warning message to notify the user to configure the inspection

(cherry picked from commit e003fe4de0)

# Conflicts:
#	erpnext/public/js/controllers/transaction.js
This commit is contained in:
Sudharsanan11
2026-05-29 18:06:32 +05:30
committed by Mergify
parent 10664b7b95
commit 42e2fd5fc9

View File

@@ -2515,7 +2515,28 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
},
freeze: true,
callback: function (r) {
<<<<<<< HEAD
r.message.forEach(item => {
=======
if (r.message.length == 0) {
let type = inspection_type === "Incoming" ? "Purchase" : "Delivery";
let fieldname =
inspection_type === "Incoming"
? "Inspection Required before Purchase"
: "Inspection Required before Delivery";
frappe.msgprint({
title: __("Quality Inspection Not Configured"),
message: __(`Enable <b>{0}</b> on the Item master to proceed with {1} inspection.`, [
fieldname,
type,
]),
});
return;
}
r.message.forEach((item) => {
>>>>>>> e003fe4de0 (fix(stock): add warning message to notify the user to configure the inspection)
if (me.has_inspection_required(item)) {
let dialog_items = dialog.fields_dict.items;
dialog_items.df.data.push({