[FIX] product: product.name_get() was O(n) instead of O(1) wrt db queries!
bzr revid: odo@openerp.com-20101221193203-51vp0cotd7nc3y7h
This commit is contained in:
parent
033179095f
commit
5cc52dfff1
|
@ -530,7 +530,13 @@ class product_product(osv.osv):
|
|||
}
|
||||
result.append(_name_get(mydict))
|
||||
else:
|
||||
result.append(_name_get(self.read(cr, user, product.id, ['variants','name','default_code'], context=context)))
|
||||
mydict = {
|
||||
'id': product.id,
|
||||
'name': product.name,
|
||||
'default_code': product.default_code,
|
||||
'variants': product.variants
|
||||
}
|
||||
result.append(_name_get(mydict))
|
||||
return result
|
||||
|
||||
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
|
||||
|
|
Loading…
Reference in New Issue