Merge pull request #44637 from frappe/mergify/bp/version-15/pr-44554

chore: Ignore stock validation for non-stock invoices (#44549)
This commit is contained in:
Deepesh Garg
2024-12-10 14:47:29 +05:30
committed by GitHub

View File

@@ -24,6 +24,10 @@ def validate_return(doc):
if doc.return_against:
validate_return_against(doc)
if doc.doctype in ("Sales Invoice", "Purchase Invoice") and not doc.update_stock:
return
validate_returned_items(doc)