Hide Buttons in Form View
In a submitted Sales Order, you can see buttons like Update Items, Status. Also there are many options under 'Create' button.
You can write custom script as shown below to hide these buttons.
frappe.ui.form.on('Sales Order', { refresh(frm) { setTimeout(() => { frm.remove_custom_button('Update Items'); frm.remove_custom_button('Close', 'Status'); frm.remove_custom_button('Work Order', 'Create'); }, 10); } })