fix: do not throw validation for canceled SLE (backport #39769) (#39810)

fix: do not throw validation for cancelled sle

(cherry picked from commit 32ccf3524a)

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-02-08 14:18:50 +05:30
committed by GitHub
parent a9c95567cb
commit 2885b8fa44

View File

@@ -53,6 +53,9 @@ class StockLedgerEntry(Document):
self.validate_inventory_dimension_negative_stock()
def validate_inventory_dimension_negative_stock(self):
if self.is_cancelled:
return
extra_cond = ""
kwargs = {}