[FIX] Disable traceback popup when rpc /calendar/notify fail

bzr revid: jke@openerp.com-20140220150817-3rvvm8neeqviba6o
This commit is contained in:
Kersten Jeremy 2014-02-20 16:08:17 +01:00
parent ddf1a51b05
commit 6305ac4094
1 changed files with 9 additions and 3 deletions

View File

@ -11,7 +11,7 @@ openerp.calendar = function(instance) {
get_next_notif: function() {
var self= this;
this.rpc("/calendar/notify")
.then(
.done(
function(result) {
_.each(result, function(res) {
setTimeout(function() {
@ -44,6 +44,12 @@ openerp.calendar = function(instance) {
},res.timer * 1000);
});
}
)
.fail(
// To override error from framework.js in RPC function
function(error, event) {
event.preventDefault();
}
);
},
check_notifications: function() {
@ -51,14 +57,14 @@ openerp.calendar = function(instance) {
self.get_next_notif();
setInterval(function(){
self.get_next_notif();
}, 5 * 60 * 1000 );
}, 5 * 60 * 1000 );
},
//Override the show_application of addons/web/static/src/js/chrome.js
show_application: function() {
this._super();
this.check_notifications();
},
},
});