minor fix
This commit is contained in:
parent
0ab1523254
commit
e9e5111a7d
|
@ -804,7 +804,6 @@ class AppWindow(FrontWindow):
|
|||
product_id = self._sale_line['product.']['id']
|
||||
except:
|
||||
product_id = self._sale_line['product']['id']
|
||||
print(product_id, 'this is product id', self._sale_line)
|
||||
if product_id and self.stock_context:
|
||||
_product, = self.Product.find(
|
||||
[('id', '=', product_id)],
|
||||
|
@ -1128,8 +1127,7 @@ class AppWindow(FrontWindow):
|
|||
self.create_new_sale()
|
||||
else:
|
||||
self.message_bar.set('enter_payment', self.default_journal['name'])
|
||||
self.field_amount.setFocus()
|
||||
self.field_amount.clearFocus()
|
||||
self.setFocus()
|
||||
|
||||
def check_delivery_party(self):
|
||||
kind = self.store.get('kind')
|
||||
|
@ -2237,12 +2235,11 @@ class AppWindow(FrontWindow):
|
|||
|
||||
def on_selected_payment(self, journal):
|
||||
self.journal = journal
|
||||
self.setFocus()
|
||||
if journal.get('id'):
|
||||
self.field_journal_id = journal['id']
|
||||
self.dialog_payment.close()
|
||||
self.message_bar.set('enter_payment', journal['name'])
|
||||
self.field_amount.setFocus()
|
||||
self.field_amount.clearFocus()
|
||||
|
||||
def on_search_product(self):
|
||||
target = self.dialog_search_products.filter_field.text()
|
||||
|
@ -3148,6 +3145,7 @@ class AppWindow(FrontWindow):
|
|||
|
||||
def keyPressEvent(self, event):
|
||||
key = event.key()
|
||||
print('key press event', key)
|
||||
self._keyStates[key] = True
|
||||
if self._state == 'add' and key not in self.keys_input and \
|
||||
key not in (Qt.Key_Enter, Qt.Key_End):
|
||||
|
|
Loading…
Reference in New Issue