Is there a way that I could add options to the core field “desk_theme” of the User doctype from my custom app? I tried the below JS script which does add the options, however when you attempt to save, it fails validation because it doesn’t think “Custom Theme” is a valid option.
frappe.ui.form.on( "User", "refresh", function( frm ){
frm.set_df_property( "desk_theme", "options", [ "Dark", "Light", "Automatic", "Custom Theme" ] );
frm.refresh_field( "desk_theme" );
} );
I was thinking maybe I could somehow set the options from my module in the after_install
method? Is that possible?
Or does someone have a solution to get around the validation?