From 61431d03846a8c3e622d3e0401ac1ac2989242c6 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 21 Nov 2013 15:22:52 +0100 Subject: [PATCH] [IMP] product: avoid redundant work bzr revid: xmo@openerp.com-20131121142252-laxz8z457yyebayj --- addons/product/product.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index eb27befa6fa..a3fdcae11ac 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -840,9 +840,7 @@ class product_product(osv.osv): context=context) def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): - if context is None: - context = {} - if context and context.get('search_default_categ_id', False): + if context and context.get('search_default_categ_id'): args.append((('categ_id', 'child_of', context['search_default_categ_id']))) return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)