fix: Add custom button to go to list
This commit is contained in:
parent
e556ea5c59
commit
ba741e5ced
1 changed files with 6 additions and 0 deletions
|
|
@ -21,6 +21,12 @@ frappe.ui.form.on('DocType', {
|
|||
frm.toggle_enable("beta", 0);
|
||||
}
|
||||
|
||||
if (!frm.is_new()) {
|
||||
frm.add_custom_button(__('Go to {0} List', [frm.doc.name]), () => {
|
||||
frappe.set_route('List', frm.doc.name, 'List');
|
||||
});
|
||||
}
|
||||
|
||||
if(!frappe.boot.developer_mode && !frm.doc.custom) {
|
||||
// make the document read-only
|
||||
frm.set_read_only();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue