fix: use field `sales_order_item` instead `name`
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 01cbbe7..81b0d01 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -217,9 +217,9 @@
data: [],
fields: [
{
- fieldname: "name",
+ fieldname: "sales_order_item",
fieldtype: "Data",
- label: __("Name"),
+ label: __("Sales Order Item"),
reqd: 1,
read_only: 1,
},
@@ -288,7 +288,7 @@
if (unreserved_qty > 0) {
dialog.fields_dict.items.df.data.push({
- 'name': item.name,
+ 'sales_order_item': item.name,
'item_code': item.item_code,
'warehouse': item.warehouse,
'qty_to_reserve': (unreserved_qty / flt(item.conversion_factor))
diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py
index ed20209..3350a68 100644
--- a/erpnext/stock/doctype/pick_list/pick_list.py
+++ b/erpnext/stock/doctype/pick_list/pick_list.py
@@ -233,7 +233,7 @@
for location in self.locations:
if location.warehouse and location.sales_order and location.sales_order_item:
item_details = {
- "name": location.sales_order_item,
+ "sales_order_item": location.sales_order_item,
"item_code": location.item_code,
"warehouse": location.warehouse,
"qty_to_reserve": (flt(location.picked_qty) - flt(location.stock_reserved_qty)),
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index d905fe5..9bc7e58 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -775,7 +775,7 @@
for item in self.items:
if item.sales_order and item.sales_order_item:
item_details = {
- "name": item.sales_order_item,
+ "sales_order_item": item.sales_order_item,
"item_code": item.item_code,
"warehouse": item.warehouse,
"qty_to_reserve": item.stock_qty,
diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py
index 0954282..df3e288 100644
--- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py
+++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py
@@ -869,7 +869,7 @@
items = []
if items_details:
for item in items_details:
- so_item = frappe.get_doc("Sales Order Item", item.get("name"))
+ so_item = frappe.get_doc("Sales Order Item", item.get("sales_order_item"))
so_item.warehouse = item.get("warehouse")
so_item.qty_to_reserve = (
flt(item.get("qty_to_reserve"))