[IMP] usability fix, makes sure that the dropdown menu displayed when expanding a field in graph view has always the same choices (addon web_graph)

bzr revid: ged@openerp.com-20131206162549-08aw50z4zdelzxgc
This commit is contained in:
Gery Debongnie 2013-12-06 17:25:49 +01:00
parent 476d0f4f38
commit 65a0a97d67
1 changed files with 3 additions and 4 deletions

View File

@ -179,7 +179,6 @@ instance.web_graph.GraphView = instance.web.View.extend({
}
},
/******************************************************************************
* Event handling methods...
******************************************************************************/
@ -318,11 +317,11 @@ instance.web_graph.GraphView = instance.web.View.extend({
display_dropdown: function (options) {
var self = this,
pivot = this.pivot_table,
already_grouped = pivot.rows.groupby.concat(pivot.cols.groupby),
possible_groups = _.difference(self.important_fields, already_grouped),
// already_grouped = pivot.rows.groupby.concat(pivot.cols.groupby),
// possible_groups = _.difference(self.important_fields, already_grouped),
dropdown_options = {
header_id: options.id,
fields: _.map(possible_groups, function (field) {
fields: _.map(self.important_fields, function (field) {
return {id: field, value: self.fields[field].string};
})};