[IMP] website_sale : improve domain for not set category in product from frontend...
authorSheth Sunny <sus@openerp.com>
Mon, 10 Nov 2014 06:36:33 +0000 (12:06 +0530)
committerJérome Maes <jem@openerp.com>
Wed, 10 Dec 2014 16:07:27 +0000 (17:07 +0100)
addons/website_sale/controllers/main.py
addons/website_sale/data/data.xml

index c3b3298..b7f9ebc 100644 (file)
@@ -192,7 +192,7 @@ class website_sale(http.Controller):
         categories = category_obj.browse(cr, uid, category_ids, context=context)
         categs = filter(lambda x: not x.parent_id, categories)
 
-        domain += [('public_categ_ids', 'in', category_ids)]
+        domain += ['|', ('public_categ_ids', 'in', category_ids), ('public_categ_ids', '=', False)]
         product_obj = pool.get('product.template')
 
         product_count = product_obj.search_count(cr, uid, domain, context=context)
index b7932d4..7b96893 100644 (file)
             <field name="member_ids" eval="[(4, ref('base.user_root'))]"/>
             <field name="use_quotations" eval="False"/>
         </record>
-
-        <!-- Product Public Categories -->
-        <record id="categ_others" model="product.public.category">
-            <field name="name">Others</field>
-        </record>
     </data>
 </openerp>