minor fix

This commit is contained in:
Camilo Sarmiento 2020-09-15 18:23:40 -05:00
parent ff857fc5b3
commit af6fe7b697
3 changed files with 4 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -118,9 +118,9 @@ class MainWindow(FrontWindow):
self.do_invoice = DoInvoice(self, self._context)
self.do_invoice.sigDoInvoice.connect(self.__do_invoice_thread)
self.set_cache_company()
if self.cache_local:
self.set_cache_company()
self.set_cache_products()
def set_domains(self):
@ -831,6 +831,7 @@ class MainWindow(FrontWindow):
def button_plus_pressed(self):
error = False
print(self._state)
if self._input_text == '' and self._amount_text == '0':
return
if self._state in ('paid', 'disabled'):
@ -1053,7 +1054,7 @@ class MainWindow(FrontWindow):
self.ModSale.reconcile_invoice({
'sale_id': self.sale_to_post['id']
})
self.set_state('finished')
# self.set_state('finished')
def _done_sale(self, is_credit=False):
self._sale['is_credit'] = is_credit
@ -1467,7 +1468,7 @@ class MainWindow(FrontWindow):
return True
def action_cancel(self):
if self._state == 'finished':
if self._state == 'disabled':
return
if self.type_pos_user == 'cashier':
self.dialog_cancel_invoice.exec_()
@ -2478,7 +2479,6 @@ class MainWindow(FrontWindow):
key not in (Qt.Key_Enter, Qt.Key_End):
# Clear ui context when keys function are pressed
self._clear_context()
if key in (Qt.Key_Return, Qt.Key_Plus):
self.button_plus_pressed()
elif key in self.show_keys:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB