minor fix, remove option cahe local products search

This commit is contained in:
wilsongomez 2022-09-05 11:06:14 -05:00
parent 62d23cb9c9
commit 543592521e
1 changed files with 9 additions and 8 deletions

View File

@ -2271,13 +2271,14 @@ class AppWindow(FrontWindow):
if not domain:
return
if self.cache_local:
domain = [clause]
products = self.local_db.find_product_elastic(domain, limit=100)
else:
fields = self.dialog_search_products.fields_names
products = self.Product.find(domain, fields=fields,
limit=100, ctx=self.stock_context)
# if self.cache_local:
# domain = [clause]
# products = self.local_db.find_product_elastic(domain, limit=100)
# print('ingresa a esta ')
# else:
fields = self.dialog_search_products.fields_names
products = self.Product.find(domain, fields=fields,
limit=100, ctx=self.stock_context)
self.dialog_search_products.set_from_values(products)
def on_search_party(self):
@ -2521,7 +2522,7 @@ class AppWindow(FrontWindow):
self.field_invoice_number.setText('')
self._clear_invoice_number = False
self.grid_amounts.label_change.setText('PENDIENTE')
print(record , 'record')
product_id = None
if record:
product_id = record['id']