[FIX] website_sale: domain with search product and category
bzr revid: chm@openerp.com-20130814103551-otfpqyxen93vlx11
This commit is contained in:
parent
b7fef8d2d3
commit
e16a75fdb6
|
@ -38,6 +38,6 @@ class mail_group(osv.Model):
|
|||
("parent_id", "=", False),
|
||||
("model", "=", 'mail.group'), ("res_id", "in", mail_group_ids)]
|
||||
|
||||
def get_public_message_ids(self, cr, uid, domain=[], order="create_date desc", limit=None, offset=0, context=None):
|
||||
def get_public_message_ids(self, cr, uid, domain=None, order="create_date desc", limit=None, offset=0, context=None):
|
||||
domain += self.get_domain_public_blog(cr, uid, context=context)
|
||||
return self.pool.get('mail.message').search(cr, uid, domain, order=order, limit=limit, offset=offset, context=context)
|
||||
|
|
|
@ -60,9 +60,14 @@ class Ecommerce(http.Controller):
|
|||
if SUPERUSER_ID != request.uid:
|
||||
domain += [('website_published', '=', True)]
|
||||
|
||||
if post.get("search"):
|
||||
domain += ['|', '|',
|
||||
('name', 'ilike', "%%%s%%" % post.get("search")),
|
||||
('description', 'ilike', "%%%s%%" % post.get("search")),
|
||||
('pos_categ_id.name', 'ilike', "%%%s%%" % post.get("search"))]
|
||||
if cat_id:
|
||||
cat_id = int(cat_id)
|
||||
domain = [('pos_categ_id.id', 'child_of', cat_id)] + domain
|
||||
domain += [('pos_categ_id.id', 'child_of', cat_id)] + domain
|
||||
|
||||
step = 20
|
||||
product_count = len(product_obj.search(request.cr, request.uid, domain))
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
</t>
|
||||
</template>
|
||||
<template id="products_categories" inherit_id="website_sale.layout" inherit_option_id="website_sale.layout" name="Products Categories">
|
||||
<template id="products_categories" inherit_id="website_sale.layout" inherit_option_id="website_sale.layout" name="Products Left Categories">
|
||||
<xpath expr="//div[@id='shop_content']" position="before">
|
||||
<div class="span4">
|
||||
<ul class="nav nav-list">
|
||||
|
|
Loading…
Reference in New Issue