[FIX] hr_attendance: disable notifications in Kiosk
No notifications should be received whilst in Kiosk Mode. closes odoo/odoo#81694 Taskid: 2704624 X-original-commit: 202a5a075b90a564d37c68d2f21f9c1edd8a7caf Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -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_ChatWindowHeader_commandClose').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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user