mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
Merge pull request #47286 from frappe/mergify/bp/version-15-hotfix/pr-47285
fix: allow to make quality inspection after Purchase / Delivery (backport #47285)
This commit is contained in:
@@ -1047,6 +1047,16 @@ class StockController(AccountsController):
|
||||
|
||||
def validate_qi_presence(self, row):
|
||||
"""Check if QI is present on row level. Warn on save and stop on submit if missing."""
|
||||
if self.doctype in [
|
||||
"Purchase Receipt",
|
||||
"Purchase Invoice",
|
||||
"Sales Invoice",
|
||||
"Delivery Note",
|
||||
] and frappe.db.get_single_value(
|
||||
"Stock Settings", "allow_to_make_quality_inspection_after_purchase_or_delivery"
|
||||
):
|
||||
return
|
||||
|
||||
if not row.quality_inspection:
|
||||
msg = _("Row #{0}: Quality Inspection is required for Item {1}").format(
|
||||
row.idx, frappe.bold(row.item_code)
|
||||
|
||||
Reference in New Issue
Block a user