Browse Source
🚑 sent messages displaying issue (#229)
* 🚑 sent messages displaying issue
* ⚡ adding sent messages to sent channel without page refreshing
pull/241/head
ILMIR
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
28 additions and
1 deletions
-
mail_sent/__manifest__.py
-
mail_sent/doc/changelog.rst
-
mail_sent/static/src/js/sent.js
|
|
@ -1,9 +1,12 @@ |
|
|
|
# Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
|
|
|
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr> |
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). |
|
|
|
{ |
|
|
|
"name": "Sentbox", |
|
|
|
"summary": """Quick way to find sent messages""", |
|
|
|
"category": "Discuss", |
|
|
|
"images": ['images/menu.png'], |
|
|
|
"version": "12.0.1.1.0", |
|
|
|
"version": "12.0.1.2.0", |
|
|
|
|
|
|
|
"author": "IT-Projects LLC, Ivan Yelizariev, Pavel Romanchenko", |
|
|
|
"support": "apps@it-projects.info", |
|
|
|
|
|
@ -1,3 +1,9 @@ |
|
|
|
`1.2.0` |
|
|
|
------- |
|
|
|
|
|
|
|
- **Imp:** Messages sent in the discuss page are automatically added to sent channel |
|
|
|
- **Fix:** Not all channel messages are shown if page was refreshed on a channel screen |
|
|
|
|
|
|
|
`1.1.0` |
|
|
|
------- |
|
|
|
|
|
|
|
|
|
@ -1,3 +1,6 @@ |
|
|
|
/* # Copyright 2018 Artyom Losev <https://it-projects.info/team/ArtyomLosev> |
|
|
|
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
|
|
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). */
|
|
|
|
odoo.define('mail_sent.sent', function (require) { |
|
|
|
"use strict"; |
|
|
|
|
|
|
@ -23,6 +26,21 @@ Manager.include({ |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
addMessage: function (data, options) { |
|
|
|
var message = this.getMessage(data.id); |
|
|
|
if (message) { |
|
|
|
var current_threads = message._threadIDs; |
|
|
|
var new_channels = data.channel_ids; |
|
|
|
if (_.without(new_channels, ...current_threads).length) { |
|
|
|
message._threadIDs = _.union(new_channels, current_threads); |
|
|
|
} |
|
|
|
} else if (data.author_id && data.author_id[0] && odoo.session_info.partner_id && |
|
|
|
data.author_id[0] === odoo.session_info.partner_id) { |
|
|
|
data.channel_ids.push('mailbox_channel_sent'); |
|
|
|
} |
|
|
|
return this._super(data, options); |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
SearchableThread.include({ |
|
|
|