Skip to content

Commit

Permalink
[FIX] orm: do not aggregate non-stored columns
Browse files Browse the repository at this point in the history
Columns defined in the new api as interger, computed and non-stored should not be aggregated in read_group.
Fallback on False if column is None
Fixes odoo#3972, opw 619536
  • Loading branch information
mart-e committed Jan 5, 2015
1 parent 1d64b65 commit 33c8aae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openerp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2109,7 +2109,7 @@ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, con
if f not in groupby_fields
if f in self._fields
if self._fields[f].type in ('integer', 'float')
if getattr(self._fields[f].base_field.column, '_classic_write')
if getattr(self._fields[f].base_field.column, '_classic_write', False)
]

field_formatter = lambda f: (self._fields[f].group_operator or 'sum', self._inherits_join_calc(f, query), f)
Expand Down

0 comments on commit 33c8aae

Please sign in to comment.