[FIX] group_by_full

bzr revid: chs@openerp.com-20111115155355-s7j3s27i2hl7xi11
This commit is contained in:
Christophe Simonis 2011-11-15 16:53:55 +01:00
parent 6ab092e612
commit 19e7261bc0
1 changed files with 2 additions and 2 deletions

View File

@ -2478,12 +2478,12 @@ class BaseModel(object):
del d['id']
if groupby and groupby in self._group_by_full:
gids = map(lambda x: x[groupby][0], data)
gids = [x[groupby][0] for x in data if x[groupby]]
stages = self._group_by_full[groupby](self, cr, uid, gids, domain, context)
# as both lists are sorted in the same way, we can merge in one pass
pos = 0
while stages and ((pos<len(data)) or (pos<len(stages))):
if (pos<len(data)) and (data[pos][groupby][0] == stages[pos][0]):
if (pos<len(data)) and (not data[pos][groupby] or (data[pos][groupby][0] == stages[pos][0])):
pos+=1
continue
val = dict.fromkeys(float_int_fields, False)