mirror of
https://bitbucket.org/presik/presik_pos.git
synced 2023-12-14 06:03:00 +01:00
Minor fixes
This commit is contained in:
parent
3647bb09b5
commit
95ead9bc87
|
@ -211,18 +211,18 @@ class SearchWindow(QDialog):
|
|||
|
||||
def execute(self):
|
||||
self.current_row = None
|
||||
self.parent.releaseKeyboard()
|
||||
# self.parent.releaseKeyboard()
|
||||
self.filter_field.setFocus()
|
||||
return self.exec_()
|
||||
|
||||
def show(self):
|
||||
self.parent.releaseKeyboard()
|
||||
# self.parent.releaseKeyboard()
|
||||
self.clear_filter()
|
||||
self.filter_field.setFocus()
|
||||
super(SearchWindow, self).show()
|
||||
|
||||
def hide(self):
|
||||
self.parent.grabKeyboard()
|
||||
# self.parent.grabKeyboard()
|
||||
self.parent.setFocus()
|
||||
super(SearchWindow, self).hide()
|
||||
|
||||
|
|
|
@ -212,7 +212,8 @@ class MainWindow(FrontWindow):
|
|||
self.Sale.to_quote(args)
|
||||
if self.model_sale_lines.rowCount() > 0:
|
||||
if self.check_salesman():
|
||||
self.state_disabled()
|
||||
# self.state_disabled()
|
||||
pass
|
||||
try:
|
||||
self.Sale.generate_shipment({
|
||||
'sale_id': self._sale['id'],
|
||||
|
@ -225,7 +226,7 @@ class MainWindow(FrontWindow):
|
|||
# Return sale to draft state
|
||||
if hasattr(self, '_sale'):
|
||||
self.Sale.to_draft(self._sale['id'])
|
||||
self.state_disabled()
|
||||
# self.state_disabled()
|
||||
|
||||
def create_gui(self):
|
||||
panels = QHBoxLayout()
|
||||
|
@ -645,6 +646,7 @@ class MainWindow(FrontWindow):
|
|||
try:
|
||||
quantity = Decimal(eval_value)
|
||||
product_id = self.product_id
|
||||
print('self.stock_context :', self.stock_context)
|
||||
if product_id and self.stock_context:
|
||||
_product, = self.Product.find([
|
||||
('id', '=', product_id)],
|
||||
|
@ -656,7 +658,11 @@ class MainWindow(FrontWindow):
|
|||
if self._current_line_id:
|
||||
self._sale_line['quantity'] = float(quantity)
|
||||
print('LINEA ENVIADA ', self._sale_line)
|
||||
rec = self.SaleLine.faster_set_quantity(self._sale_line)
|
||||
args = {
|
||||
'id': self._sale_line['id'],
|
||||
'quantity': quantity,
|
||||
}
|
||||
rec = self.SaleLine.faster_set_quantity(args)
|
||||
except:
|
||||
return self.message_bar.set('quantity_not_valid')
|
||||
|
||||
|
@ -842,7 +848,7 @@ class MainWindow(FrontWindow):
|
|||
if self.sale_automatic and self.type_pos_user not in ('cashier', 'order'):
|
||||
self.create_new_sale()
|
||||
|
||||
self.state_disabled()
|
||||
# self.state_disabled()
|
||||
self.message_bar.set('system_ready')
|
||||
return True
|
||||
|
||||
|
@ -973,9 +979,6 @@ class MainWindow(FrontWindow):
|
|||
def action_control_panel(self):
|
||||
self.dialog_control_panel.exec_()
|
||||
|
||||
# def action_help(self):
|
||||
# Help(self).show()
|
||||
|
||||
def clear_money_count_table(self):
|
||||
new_data = [[d[0], 0, 0] for d in self.model_money_count._data]
|
||||
self.model_money_count._data = new_data
|
||||
|
@ -1847,7 +1850,7 @@ class MainWindow(FrontWindow):
|
|||
# self.check_empty_sale()
|
||||
if self.type_pos_user == 'cashier':
|
||||
self.message_bar.set('not_sale')
|
||||
self.state_disabled()
|
||||
# self.state_disabled()
|
||||
return
|
||||
self.set_state('add')
|
||||
self.input_text_changed('')
|
||||
|
|
Loading…
Reference in a new issue