Last active
July 25, 2022 22:39
-
-
Save ernestoruiz89/052d92c36b3c7fdd11deb9b75b93407d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frappe.ui.keys.add_shortcut({ | |
shortcut: 'alt+p', | |
action: (e) => { | |
this.$item.find('.print-btn').trigger('click'); | |
e.preventDefault(); | |
return false; | |
}, | |
condition: () => this.$component.is(':visible') && this.$summary_container.find('.print-btn').is(":visible"), //optional | |
description: __("Print Receipt"), | |
page: cur_page.page.page //optional | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment