[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`.
pull/1367/head
Fernanda Hernández 2022-01-12 22:24:31 +00:00 committed by Pedro M. Baeza
parent 4e20cb65aa
commit 773ba68bf6
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
{ {
"name": "Email tracking", "name": "Email tracking",
"summary": "Email tracking system for all mails sent", "summary": "Email tracking system for all mails sent",
"version": "14.0.2.0.1", "version": "14.0.2.0.2",
"category": "Social Network", "category": "Social Network",
"website": "https://github.com/OCA/social", "website": "https://github.com/OCA/social",
"author": ("Tecnativa, " "Odoo Community Association (OCA)"), "author": ("Tecnativa, " "Odoo Community Association (OCA)"),

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