diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-07-19 15:36:54 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-07-19 15:36:54 +0200 |
| commit | 1f7a39964b327e9084fb905c7b325e94774080da (patch) | |
| tree | 0cf9f1d68ece39d0bdb455d76d4e39815c630c85 /addons/web/static/src | |
| parent | c65ca4ec1626ee1c35e727c3b70b64c103917312 (diff) | |
| parent | 0c42dcfc229922e21d83a3f10425fdf86ce3f8f2 (diff) | |
[MERGE] forward port branch saas-11.3 up to 0c42dcfc229
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/_deprecated/data.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/addons/web/static/src/js/_deprecated/data.js b/addons/web/static/src/js/_deprecated/data.js index eb70f330076..9f8115561b2 100644 --- a/addons/web/static/src/js/_deprecated/data.js +++ b/addons/web/static/src/js/_deprecated/data.js @@ -260,14 +260,15 @@ var QueryGroup = Class.extend({ var count_key = (grouping_fields[0] && grouping_fields[0].split(':')[0]) + '_count'; var aggregates = {}; - _(fixed_group).each(function (value, key) { - if (key.indexOf('__') === 0 + for (var key in fixed_group) { + if (fixed_group.hasOwnProperty(key)) { + if (!(key.indexOf('__') === 0 || _.contains(grouping_fields, key) - || (key === count_key)) { - return; + || (key === count_key))) { + aggregates[key] = fixed_group[key] || 0; + } } - aggregates[key] = value || 0; - }); + } this.model = new Model( model, fixed_group.__context, fixed_group.__domain); |
