[IMP] website_*: remove useless % chars surrounding ilike operand, this is the default

bzr revid: odo@openerp.com-20140129163557-0bb86mx8it57mcvi
This commit is contained in:
Olivier Dony 2014-01-29 17:35:57 +01:00
parent a09fa10c49
commit e6e8bb3789
3 changed files with 6 additions and 5 deletions

View File

@ -30,8 +30,8 @@ class WebsiteCustomer(http.Controller):
if partner_name:
domain += [
'|',
('name', 'ilike', "%%%s%%" % post.get("search")),
('website_description', 'ilike', "%%%s%%" % post.get("search"))
('name', 'ilike', post.get("search")),
('website_description', 'ilike', post.get("search"))
]
if country_id:

View File

@ -44,7 +44,8 @@ class WebsiteMembership(http.Controller):
else:
membership = None
if post_name:
base_line_domain += ['|', ('partner.name', 'ilike', "%%%s%%" % post_name), ('partner.website_description', 'ilike', "%%%s%%" % post_name)]
base_line_domain += ['|', ('partner.name', 'ilike', post_name),
('partner.website_description', 'ilike', post_name)]
# group by country, based on all customers (base domain)
membership_line_ids = membership_line_obj.search(cr, uid, base_line_domain, context=context)

View File

@ -205,8 +205,8 @@ class Ecommerce(http.Controller):
domain = request.registry.get('website').ecommerce_get_product_domain()
if search:
domain += ['|',
('name', 'ilike', "%%%s%%" % search),
('description', 'ilike', "%%%s%%" % search)]
('name', 'ilike', search),
('description', 'ilike', search)]
if category:
domain.append(('product_variant_ids.public_categ_id', 'child_of', category.id))
if filters: