[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:
Xavier Morel 2011-11-15 12:45:27 +01:00
parent e536b4ace8
commit 2b7a072a3e
1 changed files with 1 additions and 1 deletions

View File

@ -2486,7 +2486,7 @@ class BaseModel(object):
if (pos<len(data)) and (data[pos][groupby][0] == stages[pos][0]):
pos+=1
continue
val = dict(map(lambda x: (x, False), fields))
val = dict.fromkeys(float_int_fields, False)
val.update({
groupby: stages[pos],
'__domain': [(groupby, '=', stages[pos][0])]+domain,