mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge pull request #46171 from JK-1117/fix-reconciliation-inventory-dimension
Fix validation mismatch in inventory dimension fields
This commit is contained in:
@@ -397,6 +397,7 @@ def get_inventory_dimensions():
|
|||||||
"Inventory Dimension",
|
"Inventory Dimension",
|
||||||
fields=[
|
fields=[
|
||||||
"distinct target_fieldname as fieldname",
|
"distinct target_fieldname as fieldname",
|
||||||
|
"source_fieldname",
|
||||||
"reference_document as doctype",
|
"reference_document as doctype",
|
||||||
"validate_negative_stock",
|
"validate_negative_stock",
|
||||||
"name as dimension_name",
|
"name as dimension_name",
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class StockReconciliation(StockController):
|
|||||||
dimensions = get_inventory_dimensions()
|
dimensions = get_inventory_dimensions()
|
||||||
for dimension in dimensions:
|
for dimension in dimensions:
|
||||||
for row in self.items:
|
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(
|
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."
|
"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."
|
||||||
|
|||||||
Reference in New Issue
Block a user