Browse Source
Merge remote-tracking branch 'upstream/10.0' into 11.0-mail_addons-merge2
pull/235/head
Merge remote-tracking branch 'upstream/10.0' into 11.0-mail_addons-merge2
pull/235/head
ommo73
5 years ago
No known key found for this signature in database
GPG Key ID: E7E1F5C23505AFF8
28 changed files with 281 additions and 50 deletions
-
3.travis.yml
-
2mail_base/README.rst
-
1mail_base/__init__.py
-
6mail_base/__manifest__.py
-
3mail_base/controllers/main.py
-
4mail_base/doc/changelog.rst
-
7mail_base/models.py
-
3mail_base/static/lib/base.js
-
1mail_private/__init__.py
-
8mail_private/__manifest__.py
-
4mail_private/full_composer_wizard.xml
-
15mail_private/i18n/mail_private.pot
-
6mail_private/models.py
-
76mail_private/static/src/js/mail_private.js
-
16mail_private/static/src/xml/mail_private.xml
-
2mail_private/template.xml
-
2mail_to/__init__.py
-
7mail_to/__manifest__.py
-
8mail_to/doc/changelog.rst
-
19mail_to/i18n/mail_to.pot
-
2mail_to/models/__init__.py
-
18mail_to/models/mail_message.py
-
21mail_to/static/src/js/mail_to.js
-
20mail_to/static/src/js/test_mail_to.js
-
23mail_to/static/src/xml/recipient.xml
-
5mail_to/templates.xml
-
1mail_to/tests/__init__.py
-
24mail_to/tests/test_default.py
@ -1,3 +1,4 @@ |
|||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html) |
||||
|
|
||||
from . import models |
from . import models |
||||
from . import controllers |
from . import controllers |
@ -1,2 +1,3 @@ |
|||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html) |
||||
|
|
||||
from . import models |
from . import models |
@ -0,0 +1,2 @@ |
|||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
||||
|
from . import models |
@ -0,0 +1,2 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
from . import mail_message |
@ -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 |
@ -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); |
||||
|
|
||||
|
}); |
@ -1 +1,2 @@ |
|||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
||||
from . import test_default |
from . import test_default |
@ -1,18 +1,20 @@ |
|||||
|
# Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/> |
||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
||||
import odoo.tests |
import odoo.tests |
||||
|
from odoo.api import Environment |
||||
|
|
||||
|
|
||||
@odoo.tests.common.at_install(False) |
|
||||
|
@odoo.tests.common.at_install(True) |
||||
@odoo.tests.common.post_install(True) |
@odoo.tests.common.post_install(True) |
||||
class TestUi(odoo.tests.HttpCase): |
class TestUi(odoo.tests.HttpCase): |
||||
|
|
||||
def test_01_mail_to(self): |
def test_01_mail_to(self): |
||||
# checks the presence of an element with a link to the recipient |
|
||||
# TODO: instead of timeout, try to put $('a.recipient_link') as ready argument of phantom_js (third parameter) |
|
||||
code = """ |
|
||||
setTimeout(function () { |
|
||||
$('a.recipient_link')[0].click(); |
|
||||
console.log('ok'); |
|
||||
}, 1000); |
|
||||
""" |
|
||||
link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat') |
|
||||
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_to.MailTo']", login="admin") |
|
||||
|
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) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue