Browse Source
Merge pull request #235 from Ommo73/11.0-mail_addons-merge2
Merge pull request #235 from Ommo73/11.0-mail_addons-merge2
commit is created by 👷♂️ Merge Bot: https://odoo-devops.readthedocs.io/en/latest/git/github-merge-bot.htmlpull/245/head
Mitchell Admin
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 285 additions and 100 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
-
6mail_multi_website/README.rst
-
2mail_multi_website/__manifest__.py
-
6mail_multi_website/doc/index.rst
-
2mail_multi_website/static/description/index.html
-
1mail_private/__init__.py
-
10mail_private/__manifest__.py
-
5mail_private/doc/changelog.rst
-
4mail_private/full_composer_wizard.xml
-
15mail_private/i18n/mail_private.pot
-
58mail_private/models.py
-
10mail_private/static/src/css/mail_private.css
-
32mail_private/static/src/js/mail_private.js
-
25mail_private/static/src/xml/mail_private.xml
-
3mail_private/template.xml
-
1mail_private/tests/__init__.py
-
1mail_private/tests/test_js.py
-
2mail_to/__init__.py
-
7mail_to/__manifest__.py
-
6mail_to/doc/changelog.rst
-
19mail_to/i18n/mail_to.pot
-
1mail_to/models/__init__.py
-
17mail_to/models/mail_message.py
-
50mail_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,10 @@ |
|||||
|
.o_composer_suggested_channels{ |
||||
|
margin-top: -5px; |
||||
|
} |
||||
|
|
||||
|
.oe_composer_uncheck{ |
||||
|
float: bottom; |
||||
|
margin-top:5px; |
||||
|
margin-left:-5px; |
||||
|
} |
||||
|
|
@ -1,4 +1,3 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). |
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). |
||||
|
|
||||
from . import test_js |
from . import test_js |
@ -0,0 +1,2 @@ |
|||||
|
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
||||
|
from . import models |
@ -0,0 +1 @@ |
|||||
|
from . import mail_message |
@ -0,0 +1,17 @@ |
|||||
|
# 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