[FIX] mail_tracking: change order of inheritance and use return

Currently when a invoice view is reload in browser or through native
redirections, an error is raised:

```
Traceback:
TypeError: Cannot read properties of undefined (reading 'id')
at Function.convertData [as _super] (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:5768:118)
at Function.convertData (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:6651:335)
at Function.Class. (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:6478:107)
at Function.convertData (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:7779:403)
at Function.Class. (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:6478:107)
at Function.convertData (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:7818:353)
at Function.Class. (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:6478:107)
at Function.convertData (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:12197:435)
at Function.Class. (https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:6478:107)
at https://t50084-053-islamicrelief140.dev.irc.deployv.com/web/content/1819726-9a8777a/web.assets_backend.js:5790:359
```

That is because an inheritance wrong, which breaks the flow of start of model
`messaging` and causes that messages execute before the init of var `messaging`.
This commit is contained in:
Fernanda Hernández 2022-01-12 22:24:31 +00:00 committed by Jasmin Solanki
parent ce7b4209dd
commit 1f3d4579de

View File

@ -14,7 +14,6 @@ odoo.define("mail_tracking/static/src/js/discuss/discuss.js", function (require)
"mail/static/src/models/messaging_initializer/messaging_initializer.js",
{
async start() {
this._super(...arguments);
this.messaging.update({
failedmsg: [
[
@ -28,6 +27,7 @@ odoo.define("mail_tracking/static/src/js/discuss/discuss.js", function (require)
],
],
});
return this._super(...arguments);
},
async _init({
channel_slots,