diff options
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 1fece767a0d..3b0e2e27f28 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -660,6 +660,8 @@ class GroupsTreeNode: """ Return field names of exported field having a group operator """ aggregated_field_names = [] for field_name in self._export_field_names: + if field_name == '.id': + field_name = 'id' if '/' in field_name: # Currently no support of aggregated value for nested record fields # e.g. line_ids/analytic_line_ids/amount @@ -1857,7 +1859,7 @@ class ExportFormat(object): if not import_compat and groupby: groupby_type = [Model._fields[x.split(':')[0]].type for x in groupby] domain = [('id', 'in', ids)] if ids else domain - groups_data = Model.read_group(domain, field_names, groupby, lazy=False) + groups_data = Model.read_group(domain, [x if x != '.id' else 'id' for x in field_names], groupby, lazy=False) # read_group(lazy=False) returns a dict only for final groups (with actual data), # not for intermediary groups. The full group tree must be re-constructed. |
