Skip to content

Commit

Permalink
[MIG] mail_tracking: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hanamanth.gollar committed Jan 4, 2023
1 parent 09ccc66 commit 5123c4d
Show file tree
Hide file tree
Showing 23 changed files with 438 additions and 416 deletions.
18 changes: 8 additions & 10 deletions mail_tracking/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
"name": "Email tracking",
"summary": "Email tracking system for all mails sent",
"version": "15.0.1.0.2",
"version": "16.0.1.0.0",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"author": ("Tecnativa, " "Odoo Community Association (OCA)"),
Expand All @@ -25,23 +25,21 @@
"views/res_partner_view.xml",
],
"assets": {
"mail.assets_messaging": [
"mail_tracking/static/src/js/models/*.js",
],
"web.assets_backend": [
"mail_tracking/static/src/css/mail_tracking.scss",
"mail_tracking/static/src/css/failed_message.scss",
"mail_tracking/static/src/js/mail_tracking.esm.js",
"mail_tracking/static/src/js/message.esm.js",
"mail_tracking/static/src/js/failed_message/mail_failed_box.esm.js",
"mail_tracking/static/src/js/failed_message/thread.esm.js",
"mail_tracking/static/src/js/models/thread.esm.js",
"mail_tracking/static/src/js/chatter.esm.js",
"mail_tracking/static/src/js/discuss/discuss.esm.js",
],
"web.assets_qweb": [
"mail_tracking/static/src/js/failed_message/discuss.esm.js",
"mail_tracking/static/src/xml/mail_tracking.xml",
"mail_tracking/static/src/xml/failed_message/common.xml",
"mail_tracking/static/src/xml/failed_message/thread.xml",
"mail_tracking/static/src/xml/failed_message/discuss.xml",
],
"web.assets_frontend": [
"mail_tracking/static/src/css/failed_message.scss",
],
},
"demo": ["demo/demo.xml"],
"pre_init_hook": "pre_init_hook",
Expand Down
4 changes: 2 additions & 2 deletions mail_tracking/static/src/css/failed_message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
margin-bottom: 0px;

&.o_mail_not_discussion {
background-color: rgba(gray("300"), 0.5);
border-bottom: 1px solid gray("400");
background-color: rgba(map-get($grays, "300"), 0.5);
border-bottom: 1px solid map-get($grays, "400");
}

.o_thread_message_sidebar {
Expand Down
156 changes: 0 additions & 156 deletions mail_tracking/static/src/js/discuss/discuss.esm.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/* Copyright 2019 Alexandre Díaz
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */
odoo.define("mail_tracking.FailedMessageDiscuss", function (require) {
"use strict";

// To be considered:
// - One message can be displayed in many threads
// - A thread can be a mailbox, channel, ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ import {registerMessagingComponent} from "@mail/utils/messaging_component";
const {Component} = owl;

export class MessageFailedBox extends Component {
constructor(...args) {
super(...args);
}

// Get chatter() {
// return this.env.models["mail.chatter"].get(this.props.chatterLocalId);
// }

_onClickTitle() {
this.chatter.toggleMessageFailedBoxVisibility();
}
Expand Down Expand Up @@ -53,9 +45,7 @@ export class MessageFailedBox extends Component {
}

Object.assign(MessageFailedBox, {
props: {
chatterLocalId: String,
},
props: {record: Object},
template: "mail_tracking.MessageFailedBox",
});

Expand Down
58 changes: 0 additions & 58 deletions mail_tracking/static/src/js/failed_message/thread.esm.js

This file was deleted.

55 changes: 0 additions & 55 deletions mail_tracking/static/src/js/message.esm.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
/** @odoo-module **/

import {attr} from "@mail/model/model_field";
import {
registerFieldPatchModel,
registerInstancePatchModel,
} from "@mail/model/model_core";
import {registerPatch} from "@mail/model/model_core";

registerInstancePatchModel(
"mail.chatter",
"mail/static/src/models/chatter/chatter.js",
{
registerPatch({
name: "Chatter",
modelMethods: {
async refresh() {
this._super(...arguments);
this.thread.refreshMessagefailed();
Expand All @@ -23,10 +19,10 @@ registerInstancePatchModel(
this._super(...arguments);
this.thread.refreshMessagefailed();
},
}
);
registerFieldPatchModel("mail.chatter", "mail/static/src/models/chatter/chatter.js", {
isMessageFailedBoxVisible: attr({
default: true,
}),
},
fields: {
isMessageFailedBoxVisible: attr({
default: true,
}),
},
});
Loading

0 comments on commit 5123c4d

Please sign in to comment.