[REF] removes a few useless lines in view_loading method (addon web_graph)

bzr revid: ged@openerp.com-20131128105402-eb3pqksd5v9ixaxn
This commit is contained in:
Gery Debongnie 2013-11-28 11:54:02 +01:00
parent 6afd98516c
commit 7b2109dcae
1 changed files with 18 additions and 21 deletions

View File

@ -156,29 +156,26 @@ instance.web_graph.GraphView = instance.web.View.extend({
// get the fields descriptions from the model
var deferred2 = model.call('fields_get', []).then(function (fs) {
self.fields = fs;
console.log("fiels",self.fields);
var measure_selection = self.$('.graph_measure_selection');
_.each(self.measure_list, function (measure) {
var choice = $('<a></a>').attr('data-choice', measure)
.attr('href', '#')
.append(self.fields[measure].string);
measure_selection.append($('<li></li>').append(choice));
});
});
return $.when(deferred1, deferred2)
.then(function () {
var data = {
model: model,
domain: [],
measure: self.measure,
col_groupby: [],
row_groupby: row_groupby,
};
self.pivot_table = new openerp.web_graph.PivotTable(data);
var measure_selection = self.$('.graph_measure_selection');
_.each(self.measure_list, function (measure) {
var choice = $('<a></a>').attr('data-choice', measure)
.attr('href', '#')
.append(self.fields[measure].string);
measure_selection.append($('<li></li>').append(choice));
});
});
return $.when(deferred1, deferred2).then(function () {
var data = {
model: model,
domain: [],
measure: self.measure,
col_groupby: [],
row_groupby: row_groupby,
};
self.pivot_table = new openerp.web_graph.PivotTable(data);
});
},
do_search: function (domain, context, group_by) {