[IMP] orm: make creation of dict from key names (with constant value) clearer
also only generate False values for float and integer fields, since they're the only aggregated values in the first place bzr revid: xmo@openerp.com-20111115114527-t92a37kdw4yqqs4p
This commit is contained in:
parent
e536b4ace8
commit
2b7a072a3e
|
@ -2486,7 +2486,7 @@ class BaseModel(object):
|
||||||
if (pos<len(data)) and (data[pos][groupby][0] == stages[pos][0]):
|
if (pos<len(data)) and (data[pos][groupby][0] == stages[pos][0]):
|
||||||
pos+=1
|
pos+=1
|
||||||
continue
|
continue
|
||||||
val = dict(map(lambda x: (x, False), fields))
|
val = dict.fromkeys(float_int_fields, False)
|
||||||
val.update({
|
val.update({
|
||||||
groupby: stages[pos],
|
groupby: stages[pos],
|
||||||
'__domain': [(groupby, '=', stages[pos][0])]+domain,
|
'__domain': [(groupby, '=', stages[pos][0])]+domain,
|
||||||
|
|
Loading…
Reference in New Issue