Browse Source
[11.0][PORT] port mail_base, mail_all, mail_archives, mail_sent to v11 (#127)
[11.0][PORT] port mail_base, mail_all, mail_archives, mail_sent to v11 (#127)
* [PORT] Ported_mail archives, mail_to, mail_base to Odoo 11.0 * [FIX] mail_base get_domain method fix; mail_archives add channel fix * [PORT] mail all to 11.0 * [PORT] mail_sent to 11.0 * [FIX] mail_archives domain fix * [FIX] mail_base additional condition fix * [FIX] channel preview fixpull/142/head
ArtyomLosev
7 years ago
committed by
ILMIR
43 changed files with 1595 additions and 1375 deletions
-
35mail_all/README.rst
-
2mail_all/__init__.py
-
10mail_all/__openerp__.py
-
3mail_all/doc/changelog.rst
-
10mail_all/doc/index.rst
-
1mail_all/models/__init__.py
-
3mail_all/static/src/css/mail_all.css
-
62mail_all/static/src/js/mail_all.js
-
2mail_all/static/src/xml/menu.xml
-
1mail_all/views/templates.xml
-
40mail_archives/README.rst
-
2mail_archives/__openerp__.py
-
4mail_archives/doc/changelog.rst
-
20mail_archives/doc/index.rst
-
3mail_archives/static/src/css/archives.css
-
95mail_archives/static/src/js/archives.js
-
2mail_archives/static/src/xml/menu.xml
-
1mail_archives/views/templates.xml
-
30mail_base/README.rst
-
20mail_base/doc/index.rst
-
2253mail_base/static/lib/base.js
-
3mail_base/tests/__init__.py
-
17mail_base/tests/test_default.py
-
31mail_reply/README.rst
-
3mail_reply/doc/changelog.rst
-
10mail_reply/doc/index.rst
-
25mail_reply/static/src/js/mail_reply.js
-
4mail_reply/static/src/xml/reply_button.xml
-
3mail_reply/tests/__init__.py
-
40mail_reply/tests/test_default.py
-
42mail_sent/README.rst
-
2mail_sent/__openerp__.py
-
19mail_sent/doc/index.rst
-
2mail_sent/models.py
-
3mail_sent/static/src/css/sent.css
-
80mail_sent/static/src/js/sent.js
-
2mail_sent/static/src/xml/menu.xml
-
1mail_sent/views/templates.xml
-
13mail_to/README.rst
-
2mail_to/__openerp__.py
-
47mail_to/static/src/js/mail_to.js
-
1mail_to/tests/__init__.py
-
17mail_to/tests/test_default.py
@ -1,3 +1 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
|
|
||||
from . import models |
|
@ -1,6 +1,3 @@ |
|||||
Updates |
|
||||
======= |
|
||||
|
|
||||
`1.0.0` |
`1.0.0` |
||||
------- |
------- |
||||
|
|
||||
|
@ -1 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
@ -0,0 +1,3 @@ |
|||||
|
.o_channel_name.mail_all i { |
||||
|
margin-right: 4px; |
||||
|
} |
@ -1,15 +1,39 @@ |
|||||
Mail Archives |
|
||||
============= |
|
||||
|
=============== |
||||
|
Mail Archives |
||||
|
=============== |
||||
|
|
||||
Adds Archive menu, which shows sent/received messages |
Adds Archive menu, which shows sent/received messages |
||||
|
|
||||
Usage |
|
||||
----- |
|
||||
Click Discuss/Archive menu -- sent/received messages are displayed |
|
||||
|
Credits |
||||
|
======= |
||||
|
|
||||
|
Contributors |
||||
|
------------ |
||||
|
* Pavel Romanchenko <apps@it-projects.info> |
||||
|
|
||||
|
Sponsors |
||||
|
-------- |
||||
|
* `IT-Projects LLC <https://it-projects.info>`__ |
||||
|
|
||||
|
Maintainers |
||||
|
----------- |
||||
|
* `IT-Projects LLC <https://it-projects.info>`__ |
||||
|
|
||||
|
To get a guaranteed support you are kindly requested to purchase the module at `odoo apps store <https://apps.odoo.com/apps/modules/11.0/mail_archives/>`__. |
||||
|
|
||||
|
Thank you for understanding! |
||||
|
|
||||
|
`IT-Projects Team <https://www.it-projects.info/team>`__ |
||||
|
|
||||
Further information |
Further information |
||||
------------------- |
|
||||
|
=================== |
||||
|
|
||||
|
Demo: http://runbot.it-projects.info/demo/mail_addons/11.0 |
||||
|
|
||||
|
HTML Description: https://apps.odoo.com/apps/modules/11.0/mail_archives/ |
||||
|
|
||||
|
Usage instructions: `<doc/index.rst>`_ |
||||
|
|
||||
HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_archives/ |
|
||||
|
Changelog: `<doc/changelog.rst>`_ |
||||
|
|
||||
Tested on Odoo 9.0 b9f206953e3f877adf18643f154d1262842564ee |
|
||||
|
Tested on Odoo 11.0 ecbf7aa4714479229658d14cce28fa00376ed390 |
@ -0,0 +1,4 @@ |
|||||
|
`1.0.0` |
||||
|
------- |
||||
|
|
||||
|
- Init version |
@ -0,0 +1,20 @@ |
|||||
|
============== |
||||
|
Mail Archives |
||||
|
============== |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
This module does not require special configuration. |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
* Open ``Discuss``. |
||||
|
* Click ``Archive``. |
||||
|
* Sent/received messages are displayed. |
@ -0,0 +1,3 @@ |
|||||
|
.o_channel_name.mail_archives i { |
||||
|
margin-right: 4px; |
||||
|
} |
@ -1,4 +1,18 @@ |
|||||
Mail Base |
|
||||
========= |
|
||||
|
========================= |
||||
|
Mail Base |
||||
|
========================= |
||||
|
|
||||
To use this module you need either install module that depends on it or create new module. |
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
This module does not require special configuration. |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
* To use this module you need either install module that depends on it or create new module. |
2253
mail_base/static/lib/base.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
from . import test_default |
@ -0,0 +1,17 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
import odoo.tests |
||||
|
|
||||
|
|
||||
|
@odoo.tests.common.at_install(False) |
||||
|
@odoo.tests.common.post_install(True) |
||||
|
class TestUi(odoo.tests.HttpCase): |
||||
|
|
||||
|
def test_01_mail_base(self): |
||||
|
# wait till page loaded |
||||
|
code = """ |
||||
|
setTimeout(function () { |
||||
|
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_base.base']", login="admin") |
@ -1,6 +1,3 @@ |
|||||
Updates |
|
||||
======= |
|
||||
|
|
||||
`1.0.0` |
`1.0.0` |
||||
------- |
------- |
||||
|
|
||||
|
@ -1,9 +1,9 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<template> |
<template> |
||||
<t t-extend="mail.ChatThread.Message"> |
<t t-extend="mail.ChatThread.Message"> |
||||
<t t-jquery='i[class="fa fa-reply o_thread_message_reply"]' t-operation="replace"> |
|
||||
|
<t t-jquery='i[class="fa fa-reply o_thread_icon o_thread_message_reply"]' t-operation="replace"> |
||||
<i t-if="message.author_id != 'ODOOBOT' && message.model != 'mail.channel' && options.display_reply_icon" |
<i t-if="message.author_id != 'ODOOBOT' && message.model != 'mail.channel' && options.display_reply_icon" |
||||
class="fa fa-reply o_thread_message_reply" |
|
||||
|
class="fa fa-reply o_thread_icon o_thread_message_reply" |
||||
t-att-data-message-id="message.id" title="Reply"/> |
t-att-data-message-id="message.id" title="Reply"/> |
||||
</t> |
</t> |
||||
</t> |
</t> |
||||
|
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
from . import test_default |
@ -0,0 +1,40 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
import odoo.tests |
||||
|
|
||||
|
|
||||
|
@odoo.tests.common.at_install(False) |
||||
|
@odoo.tests.common.post_install(True) |
||||
|
class TestUi(odoo.tests.HttpCase): |
||||
|
|
||||
|
def test_01_mail_all(self): |
||||
|
# wait till page loaded and then click and wait again |
||||
|
code = """ |
||||
|
setTimeout(function () { |
||||
|
var reply_button = $('.o_mail_info:not(:has(.o_document_link))').find(".fa.fa-reply.o_thread_icon.o_thread_message_reply"); |
||||
|
if (reply_button.length === 0) { |
||||
|
console.log('error'); |
||||
|
} |
||||
|
reply_button[0].click(); |
||||
|
|
||||
|
setTimeout(function () { |
||||
|
var send_button = $(".btn.btn-sm.btn-primary.o_composer_button_send.hidden-xs:visible"); |
||||
|
if (send_button.length === 0) { |
||||
|
console.log('error'); |
||||
|
} |
||||
|
$("textarea.o_input.o_composer_text_field")[1].value = 'test'; |
||||
|
send_button.click(); |
||||
|
|
||||
|
setTimeout(function () { |
||||
|
if ($(".alert.o_mail_snackbar:visible").length === 0) { |
||||
|
console.log('error'); |
||||
|
} else { |
||||
|
console.log('ok'); |
||||
|
} |
||||
|
}, 1000); |
||||
|
|
||||
|
}, 3000); |
||||
|
|
||||
|
}, 1000); |
||||
|
""" |
||||
|
link = '/web#action=%s' % self.ref('mail.mail_channel_action_client_chat') |
||||
|
self.phantom_js(link, code, "odoo.__DEBUG__.services['mail_reply.reply']", login="admin") |
@ -1,16 +1,40 @@ |
|||||
Sentbox |
|
||||
|
========= |
||||
|
Sentbox |
||||
|
========= |
||||
|
|
||||
|
Adds Sent menu, which shows sent messages. |
||||
|
|
||||
|
Credits |
||||
======= |
======= |
||||
|
|
||||
Adds Sent menu, which shows sent messages |
|
||||
|
Contributors |
||||
|
------------ |
||||
|
* `Ivan Yelizariev <https://it-projects.info/team/yelizariev>`__ |
||||
|
* Pavel Romanchenko <apps@it-projects.info> |
||||
|
|
||||
|
Sponsors |
||||
|
-------- |
||||
|
* `IT-Projects LLC <https://it-projects.info>`__ |
||||
|
|
||||
|
Maintainers |
||||
|
----------- |
||||
|
* `IT-Projects LLC <https://it-projects.info>`__ |
||||
|
|
||||
|
To get a guaranteed support you are kindly requested to purchase the module at `odoo apps store <https://apps.odoo.com/apps/modules/11.0/mail_sent/>`__. |
||||
|
|
||||
Usage |
|
||||
----- |
|
||||
Click Discuss/Sent menu -- sent messages are displayed |
|
||||
|
Thank you for understanding! |
||||
|
|
||||
|
`IT-Projects Team <https://www.it-projects.info/team>`__ |
||||
|
|
||||
Further information |
Further information |
||||
------------------- |
|
||||
Further information and discussion: https://yelizariev.github.io/odoo/module/2015/02/19/sentbox.html |
|
||||
|
=================== |
||||
|
|
||||
|
Demo: http://runbot.it-projects.info/demo/mail_addons/11.0 |
||||
|
|
||||
|
HTML Description: https://apps.odoo.com/apps/modules/11.0/mail_sent/ |
||||
|
|
||||
|
Usage instructions: `<doc/index.rst>`_ |
||||
|
|
||||
HTML Description: https://apps.odoo.com/apps/modules/9.0/mail_sent/ |
|
||||
|
Changelog: `<doc/changelog.rst>`_ |
||||
|
|
||||
Tested on Odoo 9.0 b9f206953e3f877adf18643f154d1262842564ee |
|
||||
|
Tested on Odoo 11.0 ecbf7aa4714479229658d14cce28fa00376ed390 |
@ -0,0 +1,19 @@ |
|||||
|
========= |
||||
|
Sentbox |
||||
|
========= |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
This module does not require special configuration. |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
* Open menu ``Discuss / Sent`` |
||||
|
* You see sent messages |
@ -0,0 +1,3 @@ |
|||||
|
.o_channel_name.mail_sent i { |
||||
|
margin-right: 4px; |
||||
|
} |
@ -1,31 +1,30 @@ |
|||||
odoo.define('mail_to.MailTo', function (require) { |
odoo.define('mail_to.MailTo', function (require) { |
||||
"use strict"; |
"use strict"; |
||||
|
|
||||
var base_obj = require('mail_base.base'); |
|
||||
|
var chat_manager = require('mail_base.base').chat_manager; |
||||
|
|
||||
base_obj.MailTools.include({ |
|
||||
make_message: function(data){ |
|
||||
var msg = this._super(data); |
|
||||
msg.partner_ids = data.partner_ids; |
|
||||
if (!msg.partner_ids) { |
|
||||
return msg; |
|
||||
|
var make_message_super = chat_manager.make_message; |
||||
|
chat_manager.make_message = function (data) { |
||||
|
var msg = make_message_super.call(this, data); |
||||
|
msg.partner_ids = data.partner_ids; |
||||
|
if (!msg.partner_ids) { |
||||
|
return msg; |
||||
|
} |
||||
|
var more_recipients = ''; |
||||
|
// value which define more recipients
|
||||
|
msg.more_recipients_value = 4; |
||||
|
for (var i = 0; i < msg.partner_ids.length; i++) { |
||||
|
if (i >= msg.more_recipients_value) { |
||||
|
// append names
|
||||
|
more_recipients += msg.partner_ids[i][1]; |
||||
|
// separate them with semicolon
|
||||
|
if (i < msg.partner_ids.length - 1){ |
||||
|
more_recipients += '; '; |
||||
} |
} |
||||
|
|
||||
var more_recipients = ''; |
|
||||
// value which define more recipients
|
|
||||
msg.more_recipients_value = 4; |
|
||||
for (var i = 0; i < msg.partner_ids.length; i++){ |
|
||||
if (i >= msg.more_recipients_value){ |
|
||||
// append names
|
|
||||
more_recipients += msg.partner_ids[i][1]; |
|
||||
// separate them with semicolon
|
|
||||
if (i < msg.partner_ids.length - 1){ |
|
||||
more_recipients += '; '; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
msg.more_recipients = more_recipients; |
|
||||
return msg; |
|
||||
} |
} |
||||
}); |
|
||||
|
} |
||||
|
msg.more_recipients = more_recipients; |
||||
|
return msg; |
||||
|
}; |
||||
|
return chat_manager; |
||||
}); |
}); |
@ -0,0 +1 @@ |
|||||
|
from . import test_default |
@ -0,0 +1,17 @@ |
|||||
|
import odoo.tests |
||||
|
|
||||
|
|
||||
|
@odoo.tests.common.at_install(False) |
||||
|
@odoo.tests.common.post_install(True) |
||||
|
class TestUi(odoo.tests.HttpCase): |
||||
|
|
||||
|
def test_01_mail_to(self): |
||||
|
# checks the presence of an element with a link to the recipient |
||||
|
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") |
Write
Preview
Loading…
Cancel
Save
Reference in new issue