Hi All,
Finding on my dev instance that when I use the below script, the field correctly becomes read only and saves (document reloads immediately on save). I can reload the document and it remains read only, however if I log out or reload via the user menu the read only flag appears to go.
frappe.ui.form.on('Stages Variation Table', {
variation_sign_off_check: function(frm) {
if (cur_frm.doc.variation_sign_off_check==1) {
cur_frm.set_df_property("variation_sign_off_check", "read_only", cur_frm.doc.__islocal ? 0 : 1);
cur_frm.save();
}
}
});