diff options
| author | Gery Debongnie <ged@openerp.com> | 2014-02-24 12:05:54 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2014-02-24 12:05:54 +0100 |
| commit | f94f50c7e86a444508b096c8e9693c8d22a7abb4 (patch) | |
| tree | df90dd4bc4408577d2592ec2811372bb8248c435 /addons/web/static/src/js | |
| parent | 85d3f2ebf507ab26872524dda2365075229acd71 (diff) | |
[FIX] fixes a crash caused by incorrect use of date/datetime fields of the form 'date:interval': the list view in some case tried to format the strings as a date, and it could not parse it.
lp bug: https://launchpad.net/bugs/1279382 fixed
bzr revid: ged@openerp.com-20140224110554-y007810prx7qg5yi
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index cc595c30688..24a4dc3dd2a 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -221,11 +221,12 @@ instance.web.QueryGroup = instance.web.Class.extend({ {__context: {group_by: []}, __domain: []}, read_group_group); + var raw_field = grouping_field && grouping_field.split(':')[0]; var aggregates = {}; _(fixed_group).each(function (value, key) { if (key.indexOf('__') === 0 - || key === grouping_field - || key === grouping_field + '_count') { + || key === raw_field + || key === raw_field + '_count') { return; } aggregates[key] = value || 0; @@ -234,7 +235,6 @@ instance.web.QueryGroup = instance.web.Class.extend({ this.model = new instance.web.Model( model, fixed_group.__context, fixed_group.__domain); - var raw_field = grouping_field && grouping_field.split(':')[0]; var group_size = fixed_group[raw_field + '_count'] || fixed_group.__count || 0; var leaf_group = fixed_group.__context.group_by.length === 0; |
