fix(stock): enable quality inspection for all Stock Entry purposes

Backport of #55830 to version-15.

Allow creating a Quality Inspection from Stock Entries of any purpose
(not just Manufacture). check_item_quality_inspection now returns the
items for Stock Entry, and the inspection type is resolved as "Incoming"
for Manufacture / Material Receipt and "Outgoing" otherwise.

Ref: #70945
This commit is contained in:
Sudharsanan11
2026-06-16 20:22:09 +05:30
parent 8a59385b22
commit 1ffef19957
4 changed files with 338 additions and 4 deletions

View File

@@ -1694,7 +1694,7 @@ def check_item_quality_inspection(doctype: str, docstatus: str | int, items: str
inspection_fieldname = inspection_fieldname_map.get(doctype)
if inspection_fieldname is None:
return []
return items if doctype == "Stock Entry" else []
allow_after_transaction = cint(docstatus) == 1 and frappe.get_single_value(
"Stock Settings", "allow_to_make_quality_inspection_after_purchase_or_delivery"