Hello Everyone,
In any doctype if I want to disallow rename fuction than how it can be done?
Thanks in advance
Hello Everyone,
In any doctype if I want to disallow rename fuction than how it can be done?
Thanks in advance
Create a property setter (like this one for Item DocType):
{
"name":"Item-main-allow_rename",
"owner":"Administrator",
"creation":"2022-11-22 19:33:26.977825",
"modified":"2022-11-22 19:33:26.977825",
"modified_by":"Administrator",
"docstatus":0,
"idx":0,
"is_system_generated":0,
"doctype_or_field":"DocType",
"doc_type":"Item",
"property":"allow_rename",
"property_type":"Check",
"value":"0",
"doctype":"Property Setter"
}
Hello @Foram [For custom Doctype only]
First you would have to enable developer mode
you can do that by simply adding this line of code in you ./bench/sites/your_site/site.config.json file
"developer_mode": 1,
Next open the list page of any doctype and above there when you click on three dost you can see “Edit doctype” option
Once you clikc on that go below and you can see this check box Rename doctype
You should avoid doing this for core doctypes of frappe / erpnext as it will broke upcoming version upgrade, there are alternate solutions available.
Manual creation of property setter is one of them.
I want to disallow the renaming of item doctype without developer mode on.
Can you brief it what you are saying for disallowing the renaming of item doctype?