[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
This commit is contained in:
parent
85d3f2ebf5
commit
f94f50c7e8
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue