diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 02a13a41dcb..31d68b64911 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -2434,9 +2434,9 @@ class BaseModel(object): context=context) result_template = dict.fromkeys(aggregated_fields, False) - result_template.update({groupby + '_count':0}) + result_template[groupby + '_count'] = 0 if groupby_list and len(groupby_list) > 1: - result_template.update(__context={'group_by': groupby_list[1:]}) + result_template['__context'] = {'group_by': groupby_list[1:]} # Merge the left_side (current results as dicts) with the right_side (all # possible values as m2o pairs). Both lists are supposed to be using the @@ -2455,10 +2455,8 @@ class BaseModel(object): grouped_value = right_side[0] if not grouped_value in known_values: line = dict(result_template) - line.update({ - groupby: right_side, - '__domain': [(groupby,'=',grouped_value)] + domain, - }) + line[groupby] = right_side + line['__domain'] = [(groupby,'=',grouped_value)] + domain result.append(line) known_values[grouped_value] = line while read_group_result or all_groups: