fix(pick list): make warehouse editable

(cherry picked from commit f5beda48dc)
This commit is contained in:
ravibharathi656
2025-07-23 08:34:52 +05:30
committed by Mergify
parent 21bdf6ef14
commit 6a5041042e
2 changed files with 19 additions and 2 deletions

View File

@@ -21,6 +21,14 @@ frappe.ui.form.on("Pick List", {
"Stock Entry": "Stock Entry", "Stock Entry": "Stock Entry",
}; };
frm.set_query("warehouse", "locations", () => {
return {
filters: {
company: frm.doc.company,
},
};
});
frm.set_query("parent_warehouse", () => { frm.set_query("parent_warehouse", () => {
return { return {
filters: { 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) => { get_item_locations: (frm) => {
// Button on the form // Button on the form
frm.events.set_item_locations(frm, false); frm.events.set_item_locations(frm, false);

View File

@@ -201,7 +201,7 @@
}, },
{ {
"default": "0", "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", "fieldname": "pick_manually",
"fieldtype": "Check", "fieldtype": "Check",
"label": "Pick Manually" "label": "Pick Manually"
@@ -247,7 +247,7 @@
], ],
"is_submittable": 1, "is_submittable": 1,
"links": [], "links": [],
"modified": "2025-05-31 19:18:30.860044", "modified": "2025-07-23 08:34:32.099673",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Pick List", "name": "Pick List",