How enable customization for single doctypes?

I want to add a custom field on HR Settings but it gets disabled by default in V12 :worried:

Is there a way to enable it for the administrator or expert system user?

1 Like

You could try to do this with a fixture from a custom app…?

I did the customization from V11 then export it to custom app.

but why the headache?!!!:grimacing:
I am very frustrated from the remove feature is valid and needed for a lot of users just to keep them safe :persevere:

Change frappe core files temporarily. Do your export. And revert back

[1] frappe/frappe/custom/doctype/customize_form/customize_form.js at develop · frappe/frappe · GitHub

Change to [‘DocType’, ‘issingle’, ‘=’, 1],

[2] frappe/frappe/custom/doctype/customize_form/customize_form.py at develop · frappe/frappe · GitHub

Comment line 95 and 96

[3]
Go to Customize Form–>select your single doctype–>export it to your custom app
[4]
Go to file system of frappe app and do git stash (to loose above core changes )

3 Likes

do you mean “HR Settings” (> Human Resources > Setup > HR Settings)?

@ashish-greycube Thanks, I already try that and it is working fine.
I am just want to highlight this to core team of frappe.
If they are willing to switch off some features at least tell the community and try to keep some door open for the expert users to use and utilize that feature

2 Likes

@vrms Sorry, it is a typo .
I mean HR Settings

Another work-around is to add the Custom Fields manually in their listview, and then use the good old fixtures in your custom app hooks.py file to export them:

fixtures = [
	{
		# Single DocTypes cannot be customized so we use a fixture instead.
		"dt": "Custom Field",
		"filters": [ ["dt", "=", "Woocommerce Settings"] ]
	},
]

Agreed this is a bit silly:

Thanks, it works for me