validate options menu app for profile cashier
This commit is contained in:
parent
35bc824e9c
commit
d56f67057c
|
@ -37,16 +37,18 @@ class StartButtons(QVBoxLayout):
|
|||
columns = 4
|
||||
rows = 3
|
||||
|
||||
values = [
|
||||
['button_start_take_away', 'PARA LLEVAR', 'action_start_take_away', 'take_away'],
|
||||
['button_start_delivery', 'DOMICILIO', 'action_start_delivery', 'delivery'],
|
||||
]
|
||||
values = []
|
||||
values_extend = values.extend
|
||||
if parent.enviroment == 'restaurant':
|
||||
if parent.type_pos_user != 'cashier':
|
||||
values_extend([
|
||||
['button_start_table', 'A LA MESA', 'action_start_table', 'table'],
|
||||
['button_start_catering', 'CATERING', 'action_start_catering', 'catering'],
|
||||
['button_start_take_away', 'PARA LLEVAR', 'action_start_take_away', 'take_away'],
|
||||
['button_start_delivery', 'DOMICILIO', 'action_start_delivery', 'delivery'],
|
||||
])
|
||||
if parent.enviroment == 'restaurant':
|
||||
values_extend([
|
||||
['button_start_table', 'A LA MESA', 'action_start_table', 'table'],
|
||||
['button_start_catering', 'CATERING', 'action_start_catering', 'catering'],
|
||||
])
|
||||
values_extend([
|
||||
['button_start_search_order', 'BUSCAR ORDEN', 'action_search_sale', 'search_sale'],
|
||||
['button_print_sale', 'IMPRIMIR', 'action_print_sale', 'print_sale'],
|
||||
|
|
|
@ -2133,11 +2133,11 @@ class AppWindow(FrontWindow):
|
|||
code = self.dialog_search_products.current_row['code']
|
||||
products = self.Product.find([
|
||||
('code', '=', code)
|
||||
])
|
||||
], fields=['image'])
|
||||
if not products:
|
||||
return
|
||||
|
||||
product = products[0]
|
||||
# print(product['image'], 'this image')
|
||||
image = Image(name='product_icon')
|
||||
if not product['image']:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue