[FIX] website_links: properly attach graph widgets to the hierarchy

Simple `this` instead of `self` mistake which prevents the widgets to
trigger up events.

closes odoo/odoo#44617

X-original-commit: 033ad6680794e037566720f35b0285e18f3d2130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2020-02-04 17:09:32 +00:00
parent 56f2a70346
commit eccf6ed458
@@ -171,27 +171,27 @@ publicWidget.registry.websiteLinksCharts = publicWidget.Widget.extend({
// Process all time line chart data
var now = moment();
self.charts.all_time_bar = new BarChart(this, beginDate, now, formattedClicksByDay);
self.charts.all_time_bar = new BarChart(self, beginDate, now, formattedClicksByDay);
self.charts.all_time_bar.attachTo($('#all_time_clicks_chart'));
// Process month line chart data
beginDate = moment().subtract(30, 'days');
self.charts.last_month_bar = new BarChart(this, beginDate, now, formattedClicksByDay);
self.charts.last_month_bar = new BarChart(self, beginDate, now, formattedClicksByDay);
self.charts.last_month_bar.attachTo($('#last_month_clicks_chart'));
// Process week line chart data
beginDate = moment().subtract(7, 'days');
self.charts.last_week_bar = new BarChart(this, beginDate, now, formattedClicksByDay);
self.charts.last_week_bar = new BarChart(self, beginDate, now, formattedClicksByDay);
self.charts.last_week_bar.attachTo($('#last_week_clicks_chart'));
// Process pie charts
self.charts.all_time_pie = new PieChart(this, _clicksByCountry);
self.charts.all_time_pie = new PieChart(self, _clicksByCountry);
self.charts.all_time_pie.attachTo($('#all_time_countries_charts'));
self.charts.last_month_pie = new PieChart(this, _lastMonthClicksByCountry);
self.charts.last_month_pie = new PieChart(self, _lastMonthClicksByCountry);
self.charts.last_month_pie.attachTo($('#last_month_countries_charts'));
self.charts.last_week_pie = new PieChart(this, _lastWeekClicksByCountry);
self.charts.last_week_pie = new PieChart(self, _lastWeekClicksByCountry);
self.charts.last_week_pie.attachTo($('#last_week_countries_charts'));
var rowWidth = $('#all_time_countries_charts').parent().width();