Merge pull request #7417 from scmmishra/disable-customize-hotfix
feat: disable customize option for single doctypes #7415
This commit is contained in:
commit
ac975eea13
2 changed files with 4 additions and 1 deletions
|
|
@ -89,6 +89,9 @@ class CustomizeForm(Document):
|
|||
if self.doc_type in core_doctypes_list:
|
||||
return frappe.msgprint(_("Core DocTypes cannot be customized."))
|
||||
|
||||
if meta.issingle:
|
||||
return frappe.msgprint(_("Single DocTypes cannot be customized."))
|
||||
|
||||
if meta.custom:
|
||||
return frappe.msgprint(_("Only standard DocTypes are allowed to be customized from Customize Form."))
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ frappe.ui.form.Toolbar = Class.extend({
|
|||
me.frm.savetrash();}, true);
|
||||
}
|
||||
|
||||
if(frappe.user_roles.includes("System Manager")) {
|
||||
if(frappe.user_roles.includes("System Manager") && me.frm.meta.issingle === 0) {
|
||||
this.page.add_menu_item(__("Customize"), function() {
|
||||
frappe.set_route("Form", "Customize Form", {
|
||||
doc_type: me.frm.doctype
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue