-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from Ommo73/10.0-mail_to_channels_add
10.0 mail to channels add
- Loading branch information
Showing
11 changed files
with
121 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2016 x620 <https://github.com/x620> | ||
# Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev> | ||
# Copyright 2018 Ruslan Ronzhin | ||
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
{ | ||
"name": """Show message recipients""", | ||
"summary": """Allows you be sure, that all discussion participants were notified""", | ||
"category": "Discuss", | ||
"images": ['images/1.png'], | ||
"version": "1.0.1", | ||
"version": "10.0.1.1.0", | ||
|
||
"author": "IT-Projects LLC, Pavel Romanchenko", | ||
"support": "[email protected]", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# -*- coding: utf-8 -*- | ||
from . import mail_message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
from odoo import models, api | ||
|
||
|
||
class MailMessage(models.Model): | ||
_inherit = 'mail.message' | ||
|
||
@api.multi | ||
def message_format(self): | ||
messages_values = super(MailMessage, self).message_format() | ||
for i in messages_values: | ||
if i['channel_ids']: | ||
i['channel_names'] = self.env['mail.channel'].browse(i['channel_ids']).mapped( | ||
lambda r: [r.id, '#' + r.display_name]) | ||
|
||
return messages_values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Copyright 2018 Artem Rafailov <https://it-projects.info/team/KolushovAlexandr> | ||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).*/ | ||
odoo.define('mail_to.tour', function (require) { | ||
"use strict"; | ||
|
||
var tour = require("web_tour.tour"); | ||
var core = require('web.core'); | ||
var _t = core._t; | ||
|
||
var email = 'mail_private test email'; | ||
var steps = [{ | ||
trigger: 'a.recipient_link:first', | ||
content: _t("Open Partners Form From Recipient Link"), | ||
position: 'bottom', | ||
timeout: 70000, | ||
}]; | ||
|
||
tour.register('mail_to_tour', { test: true, url: '/web' }, steps); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
from . import test_default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> | ||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). | ||
import odoo.tests | ||
from odoo.api import Environment | ||
|
||
|
||
@odoo.tests.common.at_install(True) | ||
@odoo.tests.common.post_install(True) | ||
class TestUi(odoo.tests.HttpCase): | ||
|
||
def test_01_mail_to(self): | ||
cr = self.registry.cursor() | ||
env = Environment(cr, self.uid, {}) | ||
env['ir.module.module'].search([('name', '=', 'mail_to')], limit=1).state = 'installed' | ||
cr.release() | ||
|
||
self.phantom_js("/web", | ||
"odoo.__DEBUG__.services['web_tour.tour'].run('mail_to_tour', 1000)", | ||
"odoo.__DEBUG__.services['web_tour.tour'].tours.mail_to_tour.ready", | ||
login="admin", timeout=200) |