From f94f50c7e86a444508b096c8e9693c8d22a7abb4 Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Mon, 24 Feb 2014 12:05:54 +0100 Subject: [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 --- addons/web/static/src/js/data.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src/js/data.js') 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; -- cgit v1.2.3