Try ERPNext Buy Support Partners Foundation

Sales Order Cost Center Field make Read only after status change to completed

Hello Team,

I need a support, How to make sales order cost center field as ready only after change the status completed.

frappe.ui.form.on('Sales Order', {
    refresh: function(frm) {
        if(frm.doc.status == "Completed") {
             frm.set_df_property('cost_center', 'read_only', 1);
1 Like

Thanks for the sweet support.:heart: