diff --git a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json index 5c3018f734..f92bf49137 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.json @@ -17,6 +17,7 @@ "voucher_no", "voucher_detail_no", "column_break_7dxj", + "from_voucher_type", "against_pick_list", "against_pick_list_item", "section_break_xt4m", @@ -272,10 +273,10 @@ }, { "fieldname": "against_pick_list", - "fieldtype": "Link", - "label": "Against Pick List", + "fieldtype": "Dynamic Link", + "label": "From Voucher No", "no_copy": 1, - "options": "Pick List", + "options": "from_voucher_type", "print_hide": 1, "read_only": 1, "report_hide": 1, @@ -284,7 +285,7 @@ { "fieldname": "against_pick_list_item", "fieldtype": "Data", - "label": "Against Pick List Item", + "label": "From Voucher Detail No", "no_copy": 1, "print_hide": 1, "read_only": 1, @@ -297,6 +298,16 @@ { "fieldname": "column_break_grdt", "fieldtype": "Column Break" + }, + { + "fieldname": "from_voucher_type", + "fieldtype": "Select", + "label": "From Voucher Type", + "no_copy": 1, + "options": "\nPick List\nPurchase Receipt", + "print_hide": 1, + "read_only": 1, + "report_hide": 1 } ], "hide_toolbar": 1, @@ -304,7 +315,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-08-08 17:15:13.317706", + "modified": "2023-10-19 16:09:08.418544", "modified_by": "Administrator", "module": "Stock", "name": "Stock Reservation Entry", 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 effad7df98..80f4c1e505 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/stock_reservation_entry.py @@ -927,6 +927,7 @@ def create_stock_reservation_entries_for_so_items( sre.project = sales_order.project if against_pick_list: + sre.from_voucher_type = "Pick List" sre.against_pick_list = item.pick_list sre.against_pick_list_item = item.pick_list_item