Add print menu
This commit is contained in:
20
text_interface/printermenu.py
Normal file
20
text_interface/printermenu.py
Normal 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)
|
||||
Reference in New Issue
Block a user