Hi all,
this seems like a very small issue, but it is still strange: If I want to allow a System Manager to rename a salutation (e.g. typo corrections, …), I need to leave the standard branch, because rename is disabled for Salutation (and I cannot customize allow_rename to 1, can only change the doctype, which leaves me with a change in source).
I have tried to change it with a custom script
frappe.ui.form.on("Salutation", {
refresh: function(frm) {
frm.page.add_menu_item(__("Rename"), function() {
rename(frm);
});
}
});
function rename(frm) {
frappe.prompt([
{'fieldname': 'salutation', 'fieldtype': 'Data', 'label': 'Salutation', 'reqd': 1}
],
function(values){
console.log(values);
cur_frm.set_value('salutation', values.salutation);
cur_frm.set_value('name', values.salutation);
},
__('Rename'),
__('Rename')
)
}
but to no success.
Is there any known workaround to renaming (and I don’t mean delete and create a new one)? Is there a reason, rename is deactivated (otherwise, I’ll be more than happy to send in a PR)?
Affects Frappe/ERPNExt v10.1.xx