mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
fix(stock): update target field attribute
(cherry picked from commit 7e08154217)
This commit is contained in:
@@ -139,7 +139,7 @@ class InventoryDimension(Document):
|
||||
self.source_fieldname = scrub(self.dimension_name)
|
||||
|
||||
if not self.target_fieldname:
|
||||
self.target_fieldname = scrub(self.reference_document)
|
||||
self.target_fieldname = scrub(self.dimension_name)
|
||||
|
||||
def on_update(self):
|
||||
self.add_custom_fields()
|
||||
|
||||
@@ -117,12 +117,12 @@ class TestInventoryDimension(IntegrationTestCase):
|
||||
inward.load_from_db()
|
||||
|
||||
sle_data = frappe.db.get_value(
|
||||
"Stock Ledger Entry", {"voucher_no": inward.name}, ["shelf", "warehouse"], as_dict=1
|
||||
"Stock Ledger Entry", {"voucher_no": inward.name}, ["to_shelf", "warehouse"], as_dict=1
|
||||
)
|
||||
|
||||
self.assertEqual(inward.items[0].to_shelf, "Shelf 1")
|
||||
self.assertEqual(sle_data.warehouse, warehouse)
|
||||
self.assertEqual(sle_data.shelf, "Shelf 1")
|
||||
self.assertEqual(sle_data.to_shelf, "Shelf 1")
|
||||
|
||||
outward = make_stock_entry(
|
||||
item_code=item_code,
|
||||
|
||||
Reference in New Issue
Block a user