Browse Source

Merge pull request #103 from zuher83/10.0

[FIX] website_sale_advanced_search: Add domain search if website publ…
pull/111/head
Cybrosys Technologies 7 years ago
committed by GitHub
parent
commit
3fb28c4e00
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      website_sale_advanced_search/controllers/main.py

1
website_sale_advanced_search/controllers/main.py

@ -18,6 +18,7 @@ class WebsiteSearch(http.Controller):
category = int(kw.get('category')) if not kw.get('category') == 'all' else ''
try:
domain = [('public_categ_ids', 'child_of', [category])] if category else []
domain.append(('website_published','=', True))
product_as_category = request.env['product.template'].search(domain)
sql = """select id as res_id, name as name, name as value from product_template where name ILIKE %s"""
extra_query = ''

Loading…
Cancel
Save