minor fix
This commit is contained in:
parent
d0772f8943
commit
e62689830e
|
@ -2735,10 +2735,8 @@ class AppWindow(FrontWindow):
|
|||
self.field_invoice_number.setText('')
|
||||
self._clear_invoice_number = False
|
||||
self.grid_amounts.label_change.setText('PENDIENTE')
|
||||
product_id = None
|
||||
if record:
|
||||
product_id = record['id']
|
||||
elif code:
|
||||
product_id = record['id'] if record else None
|
||||
if not product_id and code:
|
||||
# REMOVE ME THIS OPTION IS FOR BARCODE
|
||||
product = self._search_product(code)
|
||||
if product:
|
||||
|
@ -2747,7 +2745,6 @@ class AppWindow(FrontWindow):
|
|||
if not product_id:
|
||||
self._state = 'warning'
|
||||
return
|
||||
|
||||
data = {
|
||||
'sale_id': self._sale['id'],
|
||||
'product_id': product_id,
|
||||
|
@ -2755,7 +2752,6 @@ class AppWindow(FrontWindow):
|
|||
}
|
||||
if notes:
|
||||
pass
|
||||
|
||||
if list_price is not None:
|
||||
data['list_price'] = list_price
|
||||
|
||||
|
|
|
@ -182,9 +182,13 @@ class Receipt(object):
|
|||
def check_status(self, interface, device):
|
||||
status = False
|
||||
if interface == "network":
|
||||
command = "ping -c 1 " if OS_NAME == 'posix' else "ping -n 1"
|
||||
response = subprocess.call(str(command + device).split(" "))
|
||||
if response == 0:
|
||||
if OS_NAME == 'posix':
|
||||
command = "ping -c 1 "
|
||||
response = subprocess.call(str(command + device).split(" "))
|
||||
if response == 0:
|
||||
status = True
|
||||
else:
|
||||
# "ping -n 1"
|
||||
status = True
|
||||
elif interface == "usb":
|
||||
if OS_NAME == 'posix':
|
||||
|
|
Loading…
Reference in New Issue