Ability to add Single doctype to the desktop

This commit is contained in:
Kanchan Chauhan 2017-08-24 11:20:59 +05:30
parent 4b6f263390
commit 7657143221

View file

@ -152,6 +152,13 @@ frappe.ui.form.Toolbar = Class.extend({
this.page.add_menu_item(__("Reload"), function() {
me.frm.reload_doc();}, true);
// add to desktop
if(me.frm.meta.issingle) {
this.page.add_menu_item(__('Add to Desktop'), function () {
frappe.add_to_desktop(me.frm.doctype, me.frm.doctype);
}, true);
}
// delete
if((cint(me.frm.doc.docstatus) != 1) && !me.frm.doc.__islocal
&& frappe.model.can_delete(me.frm.doctype)) {