From 1a4b61a8224ca97e7dc52814859f5996ceef26cc Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 5 Jun 2026 11:44:22 +0530 Subject: [PATCH] fix(stock): skip disabled Putaway Rules in capacity validation validate_putaway_capacity selected the 'disable' field but checked rule.get('disabled') (always None), so disabled rules still enforced capacity and could wrongly raise 'Over Receipt'. Use the correct 'disable' key. Pre-existing bug surfaced during the stock_controller refactor review. --- erpnext/stock/doctype/putaway_rule/putaway_rule.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/putaway_rule/putaway_rule.py b/erpnext/stock/doctype/putaway_rule/putaway_rule.py index ea2474b112b..b7dacb9c230 100644 --- a/erpnext/stock/doctype/putaway_rule/putaway_rule.py +++ b/erpnext/stock/doctype/putaway_rule/putaway_rule.py @@ -363,7 +363,7 @@ def validate_putaway_capacity(doc): as_dict=True, ) if rule: - if rule.get("disabled"): + if rule.get("disable"): continue # dont validate for disabled rule if doc.doctype == "Stock Reconciliation":