Make Fields in Sales Order Item Read Only

How can we set fields read only? In customize form we can not set fields read only.
Using custom script I am able to set ‘Sales Order’ Fields read_only.

I have added net_weight in Sales Order Item. net_weight is fetched from Item.
To set new_weight read_only I have written following custom script, but custom script is now working for Sales Order Item

cur_frm.cscript.custom_refresh = function(doc) {

cur_frm.set_df_property("net_weight", "read_only",1);

}

Thanks,
Sambhaji

1 Like

Hello Sambhaji,

Field could be made read-only using Perm Level feature in the permission manager. Will request you to review it once.

https://erpnext.com/kb/setup/managing-perm-level