mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
fix(pick list): update warehouse property on refresh
This commit is contained in:
@@ -100,7 +100,11 @@ frappe.ui.form.on("Pick List", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
pick_manually: function (frm) {
|
pick_manually: (frm) => {
|
||||||
|
frm.trigger("update_warehouse_property");
|
||||||
|
},
|
||||||
|
|
||||||
|
update_warehouse_property: (frm) => {
|
||||||
frm.fields_dict.locations.grid.update_docfield_property(
|
frm.fields_dict.locations.grid.update_docfield_property(
|
||||||
"warehouse",
|
"warehouse",
|
||||||
"read_only",
|
"read_only",
|
||||||
@@ -114,6 +118,7 @@ frappe.ui.form.on("Pick List", {
|
|||||||
},
|
},
|
||||||
refresh: (frm) => {
|
refresh: (frm) => {
|
||||||
frm.trigger("add_get_items_button");
|
frm.trigger("add_get_items_button");
|
||||||
|
frm.trigger("update_warehouse_property");
|
||||||
if (frm.doc.docstatus === 1) {
|
if (frm.doc.docstatus === 1) {
|
||||||
const status_completed = frm.doc.status === "Completed";
|
const status_completed = frm.doc.status === "Completed";
|
||||||
frm.set_df_property("locations", "allow_on_submit", status_completed ? 0 : 1);
|
frm.set_df_property("locations", "allow_on_submit", status_completed ? 0 : 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user