mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 09:53:09 +00:00
fix(stock): enable quality inspection for all Stock Entry purposes
- Remove `depends_on` restriction from `inspection_required` field so it is visible for all Stock Entry purposes, not just Manufacture - Fix `check_item_quality_inspection` to return items for Stock Entry (was returning [] for unknown doctypes, blocking QI creation flow) - Fix `inspection_type` in transaction.js to be purpose-aware: Manufacture and Material Receipt → "Incoming"; all other purposes → "Outgoing"
This commit is contained in:
@@ -632,7 +632,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"
|
||||
|
||||
Reference in New Issue
Block a user