[IMP] Add the domain support for the one2many fields

bzr revid: stephane@openerp.com-20100611155214-jijawj3js5o4ebtu
This commit is contained in:
Stephane Wirtel
2010-06-11 17:52:14 +02:00
parent 8994901475
commit c0494be7e9
+1 -1
View File
@@ -433,7 +433,7 @@ class one2many(_column):
res = {}
for id in ids:
res[id] = []
ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
ids2 = obj.pool.get(self._obj).search(cr, user, self._domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context)
for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'):
res[r[self._fields_id]].append(r['id'])
return res