fix(pick list): make warehouse editable

This commit is contained in:
ravibharathi656
2025-07-23 08:34:52 +05:30
parent d45d20e4db
commit f5beda48dc
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",
};
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);

View File

@@ -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",