mirror of
https://github.com/frappe/erpnext.git
synced 2025-12-03 18:35:36 +00:00
fix: not able to set operation in work order
This commit is contained in:
@@ -244,7 +244,13 @@ frappe.ui.form.on("Work Order", {
|
||||
},
|
||||
|
||||
toggle_items_editable(frm) {
|
||||
frm.toggle_enable("required_items", frm.doc.__onload?.allow_editing_items === 1 ? 1 : 0);
|
||||
if (!frm.doc.__onload?.allow_editing_items) {
|
||||
frm.set_df_property("required_items", "cannot_delete_rows", true);
|
||||
frm.set_df_property("required_items", "cannot_add_rows", true);
|
||||
frm.fields_dict["required_items"].grid.update_docfield_property("item_code", "read_only", 1);
|
||||
frm.fields_dict["required_items"].grid.update_docfield_property("required_qty", "read_only", 1);
|
||||
frm.fields_dict["required_items"].grid.refresh();
|
||||
}
|
||||
},
|
||||
|
||||
hide_reserve_stock_button(frm) {
|
||||
|
||||
@@ -160,7 +160,8 @@
|
||||
"fieldname": "stock_uom",
|
||||
"fieldtype": "Link",
|
||||
"label": "Stock UOM",
|
||||
"options": "UOM"
|
||||
"options": "UOM",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_idhr",
|
||||
@@ -206,7 +207,7 @@
|
||||
"grid_page_length": 50,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2025-10-12 14:27:16.721532",
|
||||
"modified": "2025-12-02 11:16:05.081613",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Manufacturing",
|
||||
"name": "Work Order Item",
|
||||
|
||||
Reference in New Issue
Block a user