Skip to content
Snippets Groups Projects
Commit 7e957930 authored by Kevin Baptiste's avatar Kevin Baptiste
Browse files

[FIX] hr_attendance: disable notifications in Kiosk


No notifications should be received whilst in Kiosk Mode.

closes odoo/odoo#81453

Taskid: 2704624
Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent ee932eab
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,12 @@ var KioskMode = AbstractAction.extend({
return Promise.all([def, this._super.apply(this, arguments)]);
},
on_attach_callback: function () {
// Stop polling to avoid notifications in kiosk mode
this.call('bus_service', 'stopPolling');
$('body').find('.o_thread_window_close').click();
},
_onBarcodeScanned: function(barcode) {
var self = this;
core.bus.off('barcode_scanned', this, this._onBarcodeScanned);
......@@ -69,6 +75,7 @@ var KioskMode = AbstractAction.extend({
core.bus.off('barcode_scanned', this, this._onBarcodeScanned);
clearInterval(this.clock_start);
clearInterval(this._interval);
this.call('bus_service', 'startPolling');
this._super.apply(this, arguments);
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment