Merge pull request #9781 from prssanna/customize-form-button

feat: Add button to go to list in Customize Form
This commit is contained in:
mergify[bot] 2020-03-25 10:41:57 +00:00 committed by GitHub
commit 0dd7ffd915
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,10 @@ frappe.ui.form.on("Customize Form", {
if(frm.doc.doc_type) {
frappe.customize_form.set_primary_action(frm);
frm.add_custom_button(__('Go to {0} List', [frm.doc.doc_type]), function() {
frappe.set_route('List', frm.doc.doc_type);
});
frm.add_custom_button(__('Refresh Form'), function() {
frm.script_manager.trigger("doc_type");
}, "fa fa-refresh", "btn-default");