Hi @alan
when you create a new sales order the value of the cur_frm.doc.amended_from is equal to undefined
and actually in JavaScript undefined is not equal to empty string “” so your condition here will ends up to be true so the field naming_series will turn to read only
if you check it like this when the form islocal
if (cur_from.doc.__islocal){
cur_frm.set_df_property(“naming_series”, “read_only”, cur_frm.doc.amended_from !=undefined);
}