ommo73
6 years ago
No known key found for this signature in database
GPG Key ID: E7E1F5C23505AFF8
11 changed files with 121 additions and 14 deletions
-
2mail_to/__init__.py
-
7mail_to/__manifest__.py
-
8mail_to/doc/changelog.rst
-
2mail_to/models/__init__.py
-
18mail_to/models/mail_message.py
-
26mail_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
-
3mail_to/tests/__init__.py
-
21mail_to/tests/test_default.py
@ -1 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# 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); |
|||
|
|||
}); |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# License LGPL-3.0 (https://www.gnu.org/licenses/lgpl.html). |
|||
from . import test_default |
@ -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) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue