[FIX] web_graph: Adding to dashboard a customized view

When reading customized views from our dashbord in reporting,
the measures selected in the customized views were not taken into
account. It happened when the customized view was build from a report.

opw:698105
This commit is contained in:
Goffin Simon 2017-01-03 12:06:58 +01:00
parent 2b8fcfc08b
commit 0ef0e141c0
1 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,10 @@ instance.web_graph.GraphView = instance.web.View.extend({
groupbys = this.get_groupbys_from_searchview(),
col_group_by = groupbys.col_group_by,
measures = groupbys.measures;
// Do not forward-port
if(measures.length === 0 && context.measures) {
measures = context.measures;
}
if (!this.graph_widget) {
this.widget_config.context = _.clone(context);