diff --git a/cypress/integration/customize_form.js b/cypress/integration/customize_form.js index 70615085c3..01b4ebd731 100644 --- a/cypress/integration/customize_form.js +++ b/cypress/integration/customize_form.js @@ -6,6 +6,7 @@ context('Customize Form', () => { cy.fill_field("doc_type", "ToDo", "Link").blur(); cy.click_form_section("Naming"); const naming_rule_default_autoname_map = { + "Autoincrement": "autoincrement", "Set by user": "prompt", "By fieldname": "field:", 'By "Naming Series" field': "naming_series:", diff --git a/frappe/custom/doctype/customize_form/customize_form.js b/frappe/custom/doctype/customize_form/customize_form.js index 4ce2c73fa3..4c2d207df9 100644 --- a/frappe/custom/doctype/customize_form/customize_form.js +++ b/frappe/custom/doctype/customize_form/customize_form.js @@ -152,10 +152,6 @@ frappe.ui.form.on("Customize Form", { }, __("Actions") ); - - const is_autoname_autoincrement = frm.doc.autoname === 'autoincrement'; - frm.set_df_property("naming_rule", "hidden", is_autoname_autoincrement); - frm.set_df_property("autoname", "read_only", is_autoname_autoincrement); } frm.events.setup_export(frm); diff --git a/frappe/custom/doctype/customize_form/customize_form.json b/frappe/custom/doctype/customize_form/customize_form.json index a0bc994c45..6bb29fa525 100644 --- a/frappe/custom/doctype/customize_form/customize_form.json +++ b/frappe/custom/doctype/customize_form/customize_form.json @@ -56,7 +56,7 @@ "fieldtype": "Select", "label": "Naming Rule", "length": 40, - "options": "\nSet by user\nBy fieldname\nBy \"Naming Series\" field\nExpression\nExpression (old style)\nRandom\nBy script" + "options": "\nSet by user\nAutoincrement\nBy fieldname\nBy \"Naming Series\" field\nExpression\nExpression (old style)\nRandom\nBy script" }, { "fieldname": "doc_type", @@ -287,7 +287,7 @@ "label": "Naming" }, { - "description": "Naming Options:\n
field:[fieldname]. Valid fieldname must exist',
'By "Naming Series" field': 'Format: naming_series:[fieldname]. Default fieldname is naming_series',
'Expression': 'Format: format:EXAMPLE-{MM}morewords{fieldname1}-{fieldname2}-{#####} - Replace all braced words (fieldnames, date words (DD, MM, YY), series) with their value. Outside braces, any characters can be used.',