ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

[Customization] Stock entry details READ only after saving


#1

hello

can anyone check my code its not working?
I’d like to make the stock entry details read-only after saving it.

frappe.ui.form.on(“Stock Entry”, “items_on_form_rendered”, function(frm, grid_row, cdt, cdn){
var grid_row = cur_frm.open_grid_row();
if(frm.doc.workflow_state === “Send Transfer”){
grid_row.grid_form.fields_dict.item_code.df.read_only = true;
grid_row.grid_form.fields_dict.item_code.refresh();
}
})


#2

What is your use case?

There is a save / submit flow for that design.


#3

I made a workflow for this because I wanted to make an acknowledgment of the other warehouse once delivered to them. Please see the image below