minor fix
This commit is contained in:
parent
8fabce1d6a
commit
fa16cab0ca
|
@ -1945,23 +1945,24 @@ class DialogInfoProduct(QuickDialog):
|
|||
|
||||
def search(self, values=None):
|
||||
self.ok_button.setDefault(False)
|
||||
filter = self.input_filter.text()
|
||||
if not filter:
|
||||
filter_ = self.input_filter.text()
|
||||
if not filter_:
|
||||
return
|
||||
|
||||
domain = [
|
||||
('template.salable', '=', True),
|
||||
('template.account_category', '!=', None),
|
||||
]
|
||||
domain.append([
|
||||
domain_or = [
|
||||
'OR',
|
||||
('code', 'ilike', '%' + filter + '%'),
|
||||
('name', 'ilike', '%' + filter + '%')
|
||||
])
|
||||
('code', 'ilike', '%' + filter_ + '%'),
|
||||
('name', 'ilike', '%' + filter_ + '%')
|
||||
]
|
||||
|
||||
if self.parent._onebarcode_activated:
|
||||
domain.append(('barcode', 'ilike', '%' + filter + '%'))
|
||||
|
||||
domain_or.append(('barcode', 'ilike', '%' + filter_ + '%'))
|
||||
|
||||
domain.append(domain_or)
|
||||
products = self._parent.Product.find(domain, ctx=self._parent.stock_context,
|
||||
fields=['name', 'code', 'description',
|
||||
'id', 'list_price',
|
||||
|
|
15
app/main.py
15
app/main.py
|
@ -108,9 +108,9 @@ class AppWindow(FrontWindow):
|
|||
self.reader_thread.sigSetWeight.connect(self.set_weight_readed)
|
||||
|
||||
if self.server_printer and self.environment == 'restaurant':
|
||||
timer = QTimer()
|
||||
timer.timeout.connect(self.verify_print_order_automatic)
|
||||
timer.start(30000)
|
||||
self.timer = QTimer()
|
||||
self.timer.timeout.connect(self.verify_print_order_automatic)
|
||||
self.timer.start(30000)
|
||||
# self.timer = threading.Timer(30, self.verify_print_order_automatic)
|
||||
# self.timer.start()
|
||||
# atexit.register(self.terminate_timer)
|
||||
|
@ -138,6 +138,7 @@ class AppWindow(FrontWindow):
|
|||
self.field_agent = None
|
||||
|
||||
def verify_print_order_automatic(self):
|
||||
print('ingresa a validar comand')
|
||||
args = {'shop': self.shop['id']}
|
||||
orders = []
|
||||
tasks = []
|
||||
|
@ -1831,10 +1832,10 @@ class AppWindow(FrontWindow):
|
|||
def _get_info_consumer(consumer_):
|
||||
consumer = {}
|
||||
if consumer_:
|
||||
consumer['consumer_name'] = consumer.get('name', None)
|
||||
consumer['consumer_phone'] = consumer.get('phone', '')
|
||||
consumer['consumer_address'] = consumer.get('address', '')
|
||||
consumer['consumer_notes'] = consumer.get('notes', '')
|
||||
consumer['consumer_name'] = consumer_.get('name', None)
|
||||
consumer['consumer_phone'] = consumer_.get('phone', '')
|
||||
consumer['consumer_address'] = consumer_.get('address', '')
|
||||
consumer['consumer_notes'] = consumer_.get('notes', '')
|
||||
return consumer
|
||||
|
||||
order = {
|
||||
|
|
Loading…
Reference in New Issue