From 5ae9c2f62b741d64da4ce74b3b251339711e8256 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Thu, 19 Oct 2023 16:21:32 +0530 Subject: [PATCH] feat: add field `From Voucher Type` in SRE --- .../stock_reservation_entry.json | 21 ++++++++++++++----- .../stock_reservation_entry.py | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) 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