From f5beda48dcb984cf7df0d09d6360d2bb2a229164 Mon Sep 17 00:00:00 2001 From: ravibharathi656 Date: Wed, 23 Jul 2025 08:34:52 +0530 Subject: [PATCH] fix(pick list): make warehouse editable --- erpnext/stock/doctype/pick_list/pick_list.js | 17 +++++++++++++++++ erpnext/stock/doctype/pick_list/pick_list.json | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.js b/erpnext/stock/doctype/pick_list/pick_list.js index dea83560494..c72fa864960 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.js +++ b/erpnext/stock/doctype/pick_list/pick_list.js @@ -21,6 +21,14 @@ frappe.ui.form.on("Pick List", { "Stock Entry": "Stock Entry", }; + frm.set_query("warehouse", "locations", () => { + return { + filters: { + company: frm.doc.company, + }, + }; + }); + frm.set_query("parent_warehouse", () => { return { filters: { @@ -91,6 +99,15 @@ frappe.ui.form.on("Pick List", { }); } }, + + pick_manually: function (frm) { + frm.fields_dict.locations.grid.update_docfield_property( + "warehouse", + "read_only", + !frm.doc.pick_manually + ); + }, + get_item_locations: (frm) => { // Button on the form frm.events.set_item_locations(frm, false); diff --git a/erpnext/stock/doctype/pick_list/pick_list.json b/erpnext/stock/doctype/pick_list/pick_list.json index e6449476971..69a1482d6d9 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.json +++ b/erpnext/stock/doctype/pick_list/pick_list.json @@ -201,7 +201,7 @@ }, { "default": "0", - "description": "If enabled then system won't override the picked qty / batches / serial numbers.", + "description": "If enabled then system won't override the picked qty / batches / serial numbers / warehouse.", "fieldname": "pick_manually", "fieldtype": "Check", "label": "Pick Manually" @@ -247,7 +247,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2025-05-31 19:18:30.860044", + "modified": "2025-07-23 08:34:32.099673", "modified_by": "Administrator", "module": "Stock", "name": "Pick List",