minor fix

This commit is contained in:
Wilson Gomez 2023-02-27 14:17:22 -05:00
parent eaa85eb47e
commit ceeb9144f5
1 changed files with 4 additions and 1 deletions

View File

@ -2261,8 +2261,10 @@ class AppWindow(FrontWindow):
('template.name', 'ilike', '%{:}%'.format(tw)),
('description', 'ilike', '%{:}%'.format(tw)),
('code', 'ilike', '%{:}%'.format(tw)),
('barcode', '=', '%{:}%'.format(tw))
('barcode', '=', '%{:}%'.format(tw)),
]
if self.enviroment == 'retail':
clause.append(('template.reference', 'ilike', '%{:}%'.format(tw)))
domain.append(clause)
if self.shop.get('product_categories'):
@ -2280,6 +2282,7 @@ class AppWindow(FrontWindow):
# products = self.local_db.find_product_elastic(domain, limit=100)
# print('ingresa a esta ')
# else:
print(domain, 'domain')
fields = self.dialog_search_products.fields_names
products = self.Product.find(domain, fields=fields,
limit=100, ctx=self.stock_context)