Add print menu

This commit is contained in:
2017-03-22 17:02:11 +00:00
parent 1917944966
commit 6d205fcf18
3 changed files with 29 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
from printer_helpers import print_bar_code
from text_interface.helpermenus import Menu
import conf
class PrintLabelMenu(Menu):
def __init__(self):
Menu.__init__(self, 'Edit user', uses_db=True)
self.help_text = '''
Prints out a product bar code on the printer
Put it up somewhere in the vicinity.
'''
def _execute(self):
self.print_header()
product = self.input_product('Prodct> ')
print_bar_code(product.bar_code, product.name, barcode_type="ean13", rotate=False, printer_type="QL-700",
label_type=conf.label_type)