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