Skip to content
Snippets Groups Projects
Commit f25c5d85 authored by Cédric Snauwaert's avatar Cédric Snauwaert
Browse files

[REF]product: remove one extra loop

bzr revid: csn@openerp.com-20130415102121-u74t7zd3zct3q3ts
parent 9ee0b5da
No related branches found
No related tags found
No related merge requests found
......@@ -525,10 +525,9 @@ class product_product(osv.osv):
def _get_name_template_ids(self, cr, uid, ids, context=None):
result = set()
for template in self.browse(cr, uid, ids, context=context):
template_ids = self.pool.get('product.product').search(cr, uid, [('product_tmpl_id','=',template.id)])
for el in template_ids:
result.add(el)
template_ids = self.pool.get('product.product').search(cr, uid, [('product_tmpl_id', 'in', ids)])
for el in template_ids:
result.add(el)
return list(result)
_defaults = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment