[IMP] product: avoid redundant work

bzr revid: xmo@openerp.com-20131121142252-laxz8z457yyebayj
This commit is contained in:
Xavier Morel 2013-11-21 15:22:52 +01:00
parent 14d15b95a5
commit 61431d0384
1 changed files with 1 additions and 3 deletions

View File

@ -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)