chore: Ignore stock validation for non stock invoices (backport #44549) (#44554)

chore: Ignore stock validation for non stock invoices (#44549)

* chore: Ignore stock validation for non stock invoices

* chore: Ignore stock validation for non stock invoices

(cherry picked from commit 1ac292285e)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
This commit is contained in:
mergify[bot]
2024-12-05 22:57:09 +05:30
committed by GitHub
parent 63b1df38a8
commit 06ac21dd85

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)