Skip to Content
Menu
This question has been flagged

I get the following error detailed below when I use the following line 

self.call('bus_service', 'onNotification', this, this._onFingerNotification); to trigger notifications using the system bus. Any help would be welcome, thank you!


http://172.16.2.175:8117/web/content/344-cf510ed/web.assets_backend.js:2961
Traceback:
TypeError: this.call is not a function
at Class.show_application (http://172.16.2.175:8117/web/content/344-cf510ed/web.assets_backend.js:2961:221)
at Class.show_application (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:3013:371)
at Array.<anonymous> (http://172.16.2.175:8117/web/content/344-cf510ed/web.assets_backend.js:1715:1685)
at Array.<anonymous> (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:547:681)
at fire (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:541:299)
at Object.fireWith [as resolveWith] (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:546:198)
at Array.deferred.(anonymous function) (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:548:56)
at fire (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:541:299)
at Object.add [as done] (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:542:467)
at Object.<anonymous> (http://172.16.2.175:8117/web/content/251-b120e3c/web.assets_common.js:547:772)

My Javascript file is as follows:

odoo.define('fingerprint.notification', function (require) {

var WebClient = require('web.WebClient');
WebClient.include({
    _onFingerNotification: function (notifs) { 

 var self = this; _.each(notifs, function (notif) { 

 var model = notif[0][1]; 

 var type = notif[1].type; 

 var message = notif[1].message; 

 if (model === 'res.partner' && type === 'fingerprint') { 

 console.log('Data from server contorller', notif[1]); 

 // Open Dialog to show messsage 

 self.do_warn('A message from the finger print scanner.', message); 

 }  else if ( model === 'res.partner' && ( type === 'verifyFingerprint' || type == 'addFingerprint') ) { 

 console.log('Data from server contorller', notif[1]); 

 // Open Dialog to show messsage 

 self.do_notify('A message from the finger print scanner.', message); 

 } else if (model === 'res.partner' && (type === 'fingerprintFailure')) { 

 console.log('Data from server contorller', notif[1]); 

 // Open Dialog to show messsage 

 self.do_notify('A message from the finger print scanner.', message); 

 } 

    });    

},
show_application: function () { 

 if (this.call) { 

 this.call('bus_service', 'onNotification', this, this._onFingerNotification); 

 } 

 return this._super.apply(this, arguments); 

 }, 

   });

});


Avatar
Discard

i have the same probleme is there any solution

Related Posts Replies Views Activity
3
Jul 19
615
1
Dec 24
104
2
Nov 24
79
1
Oct 24
251
0
Sep 24
205