fix: use source_fieldname to validate inventory dimension

This commit is contained in:
JK1117
2025-02-27 15:17:39 +08:00
committed by GitHub
parent 4e63ee1a70
commit daa5bebdd0

View File

@@ -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."