From daa5bebdd014ea81de9856a3609b931100ac1d91 Mon Sep 17 00:00:00 2001 From: JK1117 <41583468+JK-1117@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:17:39 +0800 Subject: [PATCH] fix: use source_fieldname to validate inventory dimension --- .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index a9f99e177fd..907dd32ec44 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -92,7 +92,7 @@ class StockReconciliation(StockController): dimensions = get_inventory_dimensions() for dimension in dimensions: for row in self.items: - if not row.batch_no and row.current_qty and row.get(dimension.get("fieldname")): + if not row.batch_no and row.current_qty and row.get(dimension.get("source_fieldname")): frappe.throw( _( "Row #{0}: You cannot use the inventory dimension '{1}' in Stock Reconciliation to modify the quantity or valuation rate. Stock reconciliation with inventory dimensions is intended solely for performing opening entries."