[FIX]product:search method added for searching products by category
bzr revid: kbh@tinyerp.com-20120911083919-cwenu6oum79oa7do
This commit is contained in:
parent
063c548209
commit
af1df4d5cd
|
@ -743,6 +743,14 @@ class product_product(osv.osv):
|
|||
else:
|
||||
return super(product_product, self).copy(cr, uid, id, default=default,
|
||||
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):
|
||||
args.append((('categ_id', 'child_of', context['search_default_categ_id'])))
|
||||
return super(product_product, self).search(cr, uid, args, offset, limit, order, context, count)
|
||||
|
||||
product_product()
|
||||
|
||||
class product_packaging(osv.osv):
|
||||
|
|
Loading…
Reference in New Issue