I'm trying to override one specific function in voip module. So far, I can see no error is being thrown in debug mode but my changes are not being shown either.
Here's my code (two options have been tested unsuccessfully):
odoo.define('MYMODULE.user_agent', function (require) {
"use strict";
var voip_user_agent = require('voip.user_agent');
//OPTION 1
//var UserAgent = voip_user_agent.UserAgent.extend({
//OPTION 2
var UserAgent = voip_user_agent.extend({
_sendNotification: function (title, content) {
if (window.Notification && Notification.permission === "granted") {
return new Notification(title,
{body: content, icon: "/MYMODULE/static/src/img/phone_ringing.gif", silent: true});
}
},
});
//OPTION 1
//voip_user_agent.UserAgent = voip_user_agent;
//OPTION 2
voip_user_agent = voip_user_agent;
});
Can someone give me a hint on how to get this thing working?