[FIX] google_calendar : sync with google button not bound

Commit 002660a9b0 remove 'view_loading' method, but doesn't adapt this code.
This commit is contained in:
Jérome Maes
2016-04-22 14:49:35 +02:00
parent f5b7d2ef4f
commit d0459de338
@@ -11,12 +11,14 @@ var _t = core._t;
var QWeb = core.qweb;
CalendarView.include({
view_loading: function(r) {
init: function(parent, dataset, fields_view, options){
var self = this;
this.$el.on('click', '.o_google_sync_button', function() {
self.sync_calendar(r);
this._super.apply(this, arguments);
this.events = _.extend(this.events || {}, {
'click .o_google_sync_button': function() {
self.sync_calendar(self.fields_view);
},
});
return this._super(r);
},
sync_calendar: function(res, button) {
var self = this;