Mitchell Admin
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
67 additions and
41 deletions
-
mail_base/__manifest__.py
-
mail_base/doc/changelog.rst
-
mail_base/static/lib/base.js
-
mail_to/__manifest__.py
-
mail_to/doc/changelog.rst
-
mail_to/static/src/js/mail_to.js
-
mail_to/static/src/js/test_mail_to.js
-
mail_to/static/src/xml/recipient.xml
|
|
@ -7,7 +7,7 @@ |
|
|
|
"summary": """Makes Mail extendable""", |
|
|
|
"category": "Discuss", |
|
|
|
"images": ["images/mail_base_image.png"], |
|
|
|
"version": "11.0.1.1.1", |
|
|
|
"version": "11.0.1.1.2", |
|
|
|
"author": "IT-Projects LLC, Pavel Romanchenko", |
|
|
|
"support": "apps@itpp.dev", |
|
|
|
"website": "https://it-projects.info", |
|
|
|
|
|
@ -1,3 +1,8 @@ |
|
|
|
`1.1.2` |
|
|
|
------- |
|
|
|
|
|
|
|
**FIX**: random initialization errors |
|
|
|
|
|
|
|
`1.1.1` |
|
|
|
------- |
|
|
|
|
|
|
|
|
|
@ -123,6 +123,8 @@ ChatAction.include({ |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
function init_chat_manager(){ |
|
|
|
|
|
|
|
chat_manager.notify_incoming_message = function (msg, options) { |
|
|
|
if (bus.is_odoo_focused() && options.is_displayed) { |
|
|
|
// no need to notify
|
|
|
@ -1409,11 +1411,17 @@ chat_manager.search_partner = function (search_val, limit) { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}; // init_chat_manager
|
|
|
|
|
|
|
|
chat_manager.is_ready = chat_manager.is_ready.then(function(){ |
|
|
|
|
|
|
|
init_chat_manager(); |
|
|
|
chat_manager.start(); |
|
|
|
bus.off('notification'); |
|
|
|
bus.on('notification', null, function () { |
|
|
|
chat_manager.on_notification.apply(chat_manager, arguments); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
return { |
|
|
|
ODOOBOT_ID: ODOOBOT_ID, |
|
|
|
|
|
@ -2,13 +2,14 @@ |
|
|
|
# Copyright 2016,2020 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
|
|
|
# Copyright 2018 Ruslan Ronzhin |
|
|
|
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> |
|
|
|
# Copyright 2020 Denis Mudarisov <https://github.com/trojikman> |
|
|
|
# License MIT (https://opensource.org/licenses/MIT). |
|
|
|
{ |
|
|
|
"name": """Show message recipients""", |
|
|
|
"summary": """Allows you be sure, that all discussion participants were notified""", |
|
|
|
"category": "Discuss", |
|
|
|
"images": ["images/1.png"], |
|
|
|
"version": "11.0.1.1.1", |
|
|
|
"version": "11.0.1.1.2", |
|
|
|
"author": "IT-Projects LLC, Pavel Romanchenko", |
|
|
|
"support": "apps@itpp.dev", |
|
|
|
"website": "https://it-projects.info", |
|
|
|
|
|
@ -1,3 +1,8 @@ |
|
|
|
`1.1.2` |
|
|
|
------- |
|
|
|
|
|
|
|
- **Fix:** if open the pop-up chat window and reload the page, then an error might occur randomly |
|
|
|
|
|
|
|
`1.1.1` |
|
|
|
------- |
|
|
|
|
|
|
|
|
|
@ -2,14 +2,16 @@ |
|
|
|
* Copyright 2016-2017,2020 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
|
|
|
|
* Copyright 2017 Artyom Losev <https://it-projects.info/>
|
|
|
|
* Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
|
|
|
|
* Copyright 2020 Denis Mudarisov <https://github.com/trojikman>
|
|
|
|
* License MIT (https://opensource.org/licenses/MIT). */
|
|
|
|
odoo.define("mail_to.MailTo", function(require) { |
|
|
|
odoo.define("mail_to.MailTo", function (require) { |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
var chat_manager = require("mail_base.base").chat_manager; |
|
|
|
|
|
|
|
chat_manager.is_ready = chat_manager.is_ready.then(function () { |
|
|
|
var make_message_super = chat_manager.make_message; |
|
|
|
chat_manager.make_message = function(data) { |
|
|
|
chat_manager.make_message = function (data) { |
|
|
|
var msg = make_message_super.call(this, data); |
|
|
|
msg.partner_ids = data.partner_ids; |
|
|
|
msg.channel_names = data.channel_names; |
|
|
@ -35,6 +37,7 @@ odoo.define("mail_to.MailTo", function(require) { |
|
|
|
msg.more_recipients = more_recipients; |
|
|
|
return msg; |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
return chat_manager; |
|
|
|
}); |
|
|
@ -1,6 +1,6 @@ |
|
|
|
/* Copyright 2018 Artem Rafailov <https://it-projects.info/team/KolushovAlexandr> |
|
|
|
License MIT (https://opensource.org/licenses/MIT).*/
|
|
|
|
odoo.define("mail_to.tour", function(require) { |
|
|
|
odoo.define("mail_to.tour", function (require) { |
|
|
|
"use strict"; |
|
|
|
|
|
|
|
var tour = require("web_tour.tour"); |
|
|
|
|
|
@ -8,8 +8,8 @@ |
|
|
|
<t t-jquery="p[class=o_mail_info] span:last" t-operation="after"> |
|
|
|
<span class="recipients_info"> |
|
|
|
<t t-if="message.partner_ids"> |
|
|
|
<t t-if="message.partner_ids.length > 0">To: </t> |
|
|
|
<t t-else="message.channel_ids.length > 0">To: </t> |
|
|
|
<t t-if="message.partner_ids.length > 0">To:</t> |
|
|
|
<t t-else="message.channel_ids.length > 0">To:</t> |
|
|
|
<t t-foreach="message.partner_ids.length" t-as="i"> |
|
|
|
<t t-if="i < message.more_recipients_value"> |
|
|
|
<a |
|
|
@ -17,10 +17,12 @@ |
|
|
|
class="recipient_link" |
|
|
|
> |
|
|
|
<i t-esc="message.partner_ids[i][1]" /> |
|
|
|
<t t-if="i < message.partner_ids.length - 1">; </t> |
|
|
|
<t t-if="i < message.partner_ids.length - 1">;</t> |
|
|
|
<t |
|
|
|
t-else="message.channel_ids.length > 0 and message.partner_ids.length < 4" |
|
|
|
>; </t> |
|
|
|
> |
|
|
|
; |
|
|
|
</t> |
|
|
|
</a> |
|
|
|
</t> |
|
|
|
</t> |
|
|
@ -35,9 +37,9 @@ |
|
|
|
class="recipient_link" |
|
|
|
> |
|
|
|
<i t-esc="message.channel_names[i][1]" /> |
|
|
|
<t |
|
|
|
t-if="i < message.channel_ids.length - 1" |
|
|
|
>; </t> |
|
|
|
<t t-if="i < message.channel_ids.length - 1"> |
|
|
|
; |
|
|
|
</t> |
|
|
|
</a> |
|
|
|
</t> |
|
|
|
</t> |
|
|
@ -46,9 +48,11 @@ |
|
|
|
t-if="message.recipients.length > message.more_recipients_value" |
|
|
|
> |
|
|
|
<span t-att-title="message.more_recipients"> |
|
|
|
and <t |
|
|
|
and |
|
|
|
<t |
|
|
|
t-esc="message.recipients.length - message.more_recipients_value" |
|
|
|
/> more |
|
|
|
/> |
|
|
|
more |
|
|
|
</span> |
|
|
|
</t> |
|
|
|
</t> |
|
|
|